From 671dbffa1b496e3a3b030f45604bf83bb38c5741 Mon Sep 17 00:00:00 2001 From: speedie Date: Tue, 9 May 2023 17:55:10 +0200 Subject: [PATCH] fix bug where the caret may be moved if a different item is selected this code made sense back when spmenu couldn't define keybinds manually, as then moving between items and moving the caret was one single case. --- libs/arg.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/arg.c b/libs/arg.c index 583f55b..c14716f 100644 --- a/libs/arg.c +++ b/libs/arg.c @@ -28,10 +28,12 @@ void moveleft(Arg *arg) { calcoffsets(); } + /* if (cursor > 0 && (!sel || !sel->left || lines > 0)) { cursor = nextrune(-1); drawmenu(); } + */ } void moveright(Arg *arg) { @@ -63,10 +65,12 @@ void moveright(Arg *arg) { drawmenu(); + /* if (text[cursor] != '\0') { cursor = nextrune(+1); drawmenu(); } + */ } void movedown(Arg *arg) {