commit 9595a883133c365dea612609c055d08f1817bd62
parent 6aa84344c2caeb66571e1a05f2e5f20c7ea7da1c
Author: hhvn <dev@hhvn.uk>
Date: Sun, 13 Jun 2021 19:25:47 +0100
dmenu.c: when shiftswapped, fallback to sel->text if text is empty
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dmenu.c b/dmenu.c
@@ -641,7 +641,7 @@ keypress(XKeyEvent *ev)
break;
case XK_Return:
case XK_KP_Enter:
- if (shiftswap)
+ if (shiftswap && text != NULL && text[0] != '\0')
puts((sel && (ev->state & ShiftMask)) ? sel->text : text);
else
puts((sel && !(ev->state & ShiftMask)) ? sel->text : text);