1
0
Fork 0

limit direction keys in vline

This commit is contained in:
Connor Lane Smith 2011-11-15 20:32:39 +01:00
parent 2b31952731
commit ebd94a6c00

View file

@ -328,6 +328,8 @@ keypress(XKeyEvent *ev) {
cursor = nextrune(-1); cursor = nextrune(-1);
break; break;
} }
if(lines > 0)
return;
/* fallthrough */ /* fallthrough */
case XK_Up: case XK_Up:
if(sel && sel->left && (sel = sel->left)->right == curr) { if(sel && sel->left && (sel = sel->left)->right == curr) {
@ -356,6 +358,8 @@ keypress(XKeyEvent *ev) {
cursor = nextrune(+1); cursor = nextrune(+1);
break; break;
} }
if(lines > 0)
return;
/* fallthrough */ /* fallthrough */
case XK_Down: case XK_Down:
if(sel && sel->right && (sel = sel->right) == next) { if(sel && sel->right && (sel = sel->right) == next) {