History

plan9: holding alt with left mouse button moves the selection to the clicked cell

Sigrid Haflínudóttir committed 6 years ago

Commit cdeb13f1 parent e95728d1 file · +9 −1Browse files

Unified · Split

plan9.c+9−1
@@ -1159,6 +1159,7 @@ threadmain(int argc, char **argv) · 1158 unmodified lines
1159 Keyboardctl kctl;1159 Keyboardctl kctl;
1160 Rune r;1160 Rune r;
1161 Mouse m;1161 Mouse m;
1162 Point p;
1162 char tmp[256];1163 char tmp[256];
1163 int oldw, oldh, w, h, n, oldbuttons;1164 int oldw, oldh, w, h, n, oldbuttons;
1164 long seed;1165 long seed;
@@ -1314,7 +1315,14 @@ noredraw: · 149 unmodified lines
1314 1315
1315 case Cmouse:1316 case Cmouse:
1316 if (m.buttons == 1) {1317 if (m.buttons == 1) {
1317 if (oldbuttons == 0 && !shiftdown) {1318 if (altdown) {
1319 p = ptmouse(m.xy);
1320 if (!eqpt(p, cur)) {
1321 snapshot();
1322 selmove(p.x-cur.x, p.y-cur.y);
1323 curmove(p.x-cur.x, p.y-cur.y);
1324 }
1325 } else if (oldbuttons == 0 && !shiftdown) {
1318 cur = ptmouse(m.xy);1326 cur = ptmouse(m.xy);
1319 sel.min = cur;1327 sel.min = cur;
1320 sel.max = cur;1328 sel.max = cur;

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