From 5573f5bd23d89b8bcc2f95f793244d42f1f431fc Mon Sep 17 00:00:00 2001 From: Andreev Gregory Date: Wed, 2 Apr 2025 13:35:06 +0300 Subject: [PATCH] Removed ability to output arbitrary text. All the output is taken from options --- dmenu.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/dmenu.c b/dmenu.c index abd979b..9c01979 100644 --- a/dmenu.c +++ b/dmenu.c @@ -538,14 +538,16 @@ insert: break; case XK_Return: case XK_KP_Enter: - puts((sel && !(ev->state & ShiftMask)) ? sel->text : text); - if (!(ev->state & ControlMask)) { - cleanup(); - exit(0); - } - if (sel) - sel->out = 1; - break; + /* This is where we are handling Ctrl+Enter/Enter and were handling Shift+Enter */ + if (sel) { + puts(sel->text); + if (!(ev->state & ControlMask)){ + cleanup(); + exit(0); + } + sel->out = 1; + } + break; case XK_Right: case XK_KP_Right: if (columns > 1) {