History

plan9: remove selw and selh

Sigrid Haflínudóttir committed 6 years ago

Commit 3ee1abf1 parent a50d6141 file · +3 −12Browse files

Unified · Split

plan9.c+3−12
@@ -72,7 +72,6 @@ static int rulerstyle = Sfancy, dotstyle = Sfancy; · 71 unmodified lines
72static int bpm = 120, apm = 120;72static int bpm = 120, apm = 120;
73static Point cur;73static Point cur;
74static Rectangle sel;74static Rectangle sel;
75static int selw, selh;
76static int charw, charh;75static int charw, charh;
77static Field field;76static Field field;
78static Mbuf_reusable mbuf, mscr;77static Mbuf_reusable mbuf, mscr;
@@ -496,7 +495,7 @@ redraw(int complete) · 417 unmodified lines
496 i = 0;495 i = 0;
497 sprint(s, "%ud,%ud", cur.x, cur.y);496 sprint(s, "%ud,%ud", cur.x, cur.y);
498 i += runesprint(linebuf, "%-10s", s);497 i += runesprint(linebuf, "%-10s", s);
499 sprint(s, "%d:%d", selw, selh);498 sprint(s, "%d:%d", sel.min.x < cur.x ? -Dx(sel) : Dx(sel), sel.max.x < cur.x ? -Dy(sel) : Dy(sel));
500 i += runesprint(linebuf+i, "%-9s", s);499 i += runesprint(linebuf+i, "%-9s", s);
501 i += runesprint(linebuf+i, "%-9s", modes[altdown ? Mslide : mode]);500 i += runesprint(linebuf+i, "%-9s", modes[altdown ? Mslide : mode]);
502 i += runesprint(linebuf+i, "%s", filename[0] ? filename : "unnamed");501 i += runesprint(linebuf+i, "%s", filename[0] ? filename : "unnamed");
@@ -514,9 +513,8 @@ fieldload(char *path) · 11 unmodified lines
514 werrstr(field_load_error_string(e));513 werrstr(field_load_error_string(e));
515 return -1;514 return -1;
516 }515 }
517 memset(&cur, 0, sizeof(cur));516 cur = ZP;
518 memset(&sel, 0, sizeof(sel));517 sel = ZR;
519 selw = selh = 0;
520 518
521 return 0;519 return 0;
522}520}
@@ -643,9 +641,6 @@ curmove(int x, int y) · 120 unmodified lines
643 cur = ptfield(addpt(cur, xy));641 cur = ptfield(addpt(cur, xy));
644 sel.min = ptfield(addpt(sel.min, xy));642 sel.min = ptfield(addpt(sel.min, xy));
645 sel.max = ptfield(addpt(sel.max, xy));643 sel.max = ptfield(addpt(sel.max, xy));
646
647 selw = selw < 0 ? sel.min.x - sel.max.x : sel.max.x - sel.min.x;
648 selh = selh < 0 ? sel.min.y - sel.max.y : sel.max.y - sel.min.y;
649}644}
650 645
651static void646static void
@@ -818,9 +813,6 @@ selext(int xdt, int ydt) · 166 unmodified lines
818 sel.max.x = MAX(0, MIN((int)field.width-1, sel.max.x));813 sel.max.x = MAX(0, MIN((int)field.width-1, sel.max.x));
819 sel.min.y = MAX(0, MIN((int)field.height-1, sel.min.y));814 sel.min.y = MAX(0, MIN((int)field.height-1, sel.min.y));
820 sel.max.y = MAX(0, MIN((int)field.height-1, sel.max.y));815 sel.max.y = MAX(0, MIN((int)field.height-1, sel.max.y));
821
822 selw = selw < 0 ? sel.min.x - sel.max.x : sel.max.x - sel.min.x;
823 selh = selh < 0 ? sel.min.y - sel.max.y : sel.max.y - sel.min.y;
824}816}
825 817
826void818void
@@ -1108,7 +1100,6 @@ noredraw: · 281 unmodified lines
1108 else {1100 else {
1109 sel.min = cur;1101 sel.min = cur;
1110 sel.max = cur;1102 sel.max = cur;
1111 selw = selh = 0;
1112 }1103 }
1113 break;1104 break;
1114 case Kack: /* C-f */1105 case Kack: /* C-f */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t