dmenu-noxz

[fork] suckless dmenu - personal fork
git clone git://git.noxz.tech/dmenu-noxz
Log | Files | Refs | README | LICENSE

commit fad429f2261022e6035174b86dbb01e0d28aaa7c
parent 94633a77175c1f0dadc52109d5c0dfaddcc314d6
Author: Chris Noxz <chris@noxz.tech>
Date:   Wed, 18 Nov 2020 11:49:03 +0100

Handle orientation movement

Diffstat:
Mdmenu.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dmenu.c b/dmenu.c @@ -537,10 +537,10 @@ keypress(XKeyEvent *ev) goto draw; case XK_g: ksym = XK_Home; break; case XK_G: ksym = XK_End; break; - case XK_h: ksym = XK_Up; break; - case XK_j: ksym = XK_Next; break; - case XK_k: ksym = XK_Prior; break; - case XK_l: ksym = XK_Down; break; + case XK_h: ksym = lines > 0 ? XK_Prior : XK_Up; break; + case XK_j: ksym = lines > 0 ? XK_Down : XK_Next; break; + case XK_k: ksym = lines > 0 ? XK_Up : XK_Prior; break; + case XK_l: ksym = lines > 0 ? XK_Next : XK_Down; break; default: return; }