circo

claudio's IRC oasis
git clone git://git.bitsmanent.org/circo
Log | Files | Refs | README | LICENSE

commit d76a14d0c4c173e30709f24cc6f38fef0d7da155
parent 56fac0789744dd278645ec1172ac70e88c6f240f
Author: Claudio Alessi <smoppy@gmail.com>
Date:   Sun, 23 Jul 2017 17:15:16 +0200

Fix command line word erasing control.

Diffstat:
Mcirco.c | 7+++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/circo.c b/circo.c @@ -328,14 +328,13 @@ cmdln_wdel(const Arg *arg) { if(!sel->cmdoff) return; - i = sel->cmdoff; - while(i && sel->cmd[i] != ' ') - --i; + i = sel->cmdoff - 1; while(i && sel->cmd[i] == ' ') --i; + while(i && sel->cmd[i] != ' ') + --i; if(i) ++i; - drawbuf(); memmove(&sel->cmd[i], &sel->cmd[sel->cmdoff], sel->cmdlen - sel->cmdoff); sel->cmdlen -= sel->cmdoff - i; sel->cmd[sel->cmdlen] = '\0';