diff options
| author | Quentin Carbonneaux | 2014-11-24 11:35:10 -0500 |
|---|---|---|
| committer | Quentin Carbonneaux | 2014-11-24 11:35:10 -0500 |
| commit | b1634e68630d9d46af933225858969d6d3e42e48 (patch) | |
| tree | d633580073b0dc757b0c2c73d640af0daac97552 | |
| parent | 14769dc6357f05fc18c9607515c2312d9b7905a1 (diff) | |
simplify cursor logic
The cursor is now allowed out of screen, because it
costs nothing and it is convenient during resizes.
The new code also allows scrolling during selection,
this is handy when the selection exceeds a screenful.
| -rw-r--r-- | main.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -93,6 +93,7 @@ gev(int fd, int flag, void *unused) || curwin->cu < curwin->l[0]) win_show_cursor(curwin, CMid); scrolling = 0; + selbeg = -1u; break; case GMouseDown: mousewin = win_which(e.mouse.x, e.mouse.y); @@ -149,11 +150,6 @@ gev(int fd, int flag, void *unused) default: break; } - selbeg = -1u; - if (curwin->cu >= curwin->l[curwin->nl]) - curwin->cu = curwin->l[curwin->nl-1]; - if (curwin->cu < curwin->l[0]) - curwin->cu = curwin->l[0]; continue; Setcursor: curwin->cu = p0; |
