From: Connor Lane Smith Date: Tue, 15 Nov 2011 19:32:39 +0000 (+0100) Subject: limit direction keys in vline X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=ebd94a6c00e0726d271d4f0c88ec67b4e290b1bd;p=dmenu.git limit direction keys in vline --- diff --git a/dmenu.c b/dmenu.c index d0e27da..99db24e 100644 --- a/dmenu.c +++ b/dmenu.c @@ -328,6 +328,8 @@ keypress(XKeyEvent *ev) { cursor = nextrune(-1); break; } + if(lines > 0) + return; /* fallthrough */ case XK_Up: if(sel && sel->left && (sel = sel->left)->right == curr) { @@ -356,6 +358,8 @@ keypress(XKeyEvent *ev) { cursor = nextrune(+1); break; } + if(lines > 0) + return; /* fallthrough */ case XK_Down: if(sel && sel->right && (sel = sel->right) == next) {