diff options
author | Connor Lane Smith <cls@lubutu.com> | 2011-11-15 20:32:39 +0100 |
---|---|---|
committer | Connor Lane Smith <cls@lubutu.com> | 2011-11-15 20:32:39 +0100 |
commit | ebd94a6c00e0726d271d4f0c88ec67b4e290b1bd (patch) | |
tree | 5829d672fd8023bf8dd186b83705ad9956bfe17f | |
parent | 2b31952731bc1c15d9a9521579b7609d50a65f01 (diff) |
limit direction keys in vline
-rw-r--r-- | dmenu.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -328,6 +328,8 @@ keypress(XKeyEvent *ev) { | |||
328 | cursor = nextrune(-1); | 328 | cursor = nextrune(-1); |
329 | break; | 329 | break; |
330 | } | 330 | } |
331 | if(lines > 0) | ||
332 | return; | ||
331 | /* fallthrough */ | 333 | /* fallthrough */ |
332 | case XK_Up: | 334 | case XK_Up: |
333 | if(sel && sel->left && (sel = sel->left)->right == curr) { | 335 | if(sel && sel->left && (sel = sel->left)->right == curr) { |
@@ -356,6 +358,8 @@ keypress(XKeyEvent *ev) { | |||
356 | cursor = nextrune(+1); | 358 | cursor = nextrune(+1); |
357 | break; | 359 | break; |
358 | } | 360 | } |
361 | if(lines > 0) | ||
362 | return; | ||
359 | /* fallthrough */ | 363 | /* fallthrough */ |
360 | case XK_Down: | 364 | case XK_Down: |
361 | if(sel && sel->right && (sel = sel->right) == next) { | 365 | if(sel && sel->right && (sel = sel->right) == next) { |