summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Carbonneaux2015-06-23 06:59:10 -0400
committerQuentin Carbonneaux2015-06-23 06:59:10 -0400
commit49aff7106bb46694716f618f985bcefe05534db2 (patch)
tree4e13d07f44c4190bf2f20bc91845e30c3ebde597
parentb2af4fb863f43b67851a1cb59767e57a89c0b0cd (diff)
fix mouse execution of Get and Look
-rw-r--r--main.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/main.c b/main.c
index 105ea91..43e4bf8 100644
--- a/main.c
+++ b/main.c
@@ -88,6 +88,7 @@ gev(int fd, int flag, void *unused)
break;
case GKey:
cmd_parse(e.key);
+ Update:
win_update(curwin);
if (!scrolling)
if (curwin->cu >= curwin->l[curwin->nl]
@@ -122,10 +123,12 @@ gev(int fd, int flag, void *unused)
eb_setmark(curwin->eb, SelBeg, p0);
eb_setmark(curwin->eb, SelEnd, p1);
}
- goto Setcursor;
+ curwin->cu = p0;
+ curwin->dirty = 1;
} else if (e.mouse.button == GBMiddle) {
p0 = win_at(mousewin, e.mouse.x, e.mouse.y);
ex_run(mousewin, p0);
+ goto Update;
} else if (e.mouse.button == GBWheelUp) {
win_scroll(mousewin, -4);
} else if (e.mouse.button == GBWheelDown) {
@@ -147,14 +150,10 @@ gev(int fd, int flag, void *unused)
eb_setmark(curwin->eb, SelBeg, selbeg);
eb_setmark(curwin->eb, SelEnd, p0);
}
- goto Setcursor;
- default:
+ curwin->cu = p0;
+ curwin->dirty = 1;
break;
}
- continue;
- Setcursor:
- curwin->cu = p0;
- curwin->dirty = 1;
}
}