From: Simon Andersson Date: Wed, 22 Jul 2015 21:30:03 +0000 (+0200) Subject: Restrict ctrl-w to last word X-Git-Url: https://scope-eye.net/git/?a=commitdiff_plain;h=4d6a97a300c12e57b5160bd2652e0f71b55de94b;p=liskon_frotz.git Restrict ctrl-w to last word Doesn't work in the middle of a line currently --- diff --git a/src/curses/ux_input.c b/src/curses/ux_input.c index 9f1367a..c05cd5a 100644 --- a/src/curses/ux_input.c +++ b/src/curses/ux_input.c @@ -449,7 +449,7 @@ zchar os_read_line (int max, zchar *buf, int timeout, int width, int continued) } break; case ZC_DEL_WORD: - if (scrpos != 0) { + if (scrpos != 0 && scrpos == len) { /* Search for start of preceding word */ int i = len; while (i > 0 && buf[i] != ' ') {