From: H. Peter Anvin Date: Fri, 14 Aug 2009 05:31:13 +0000 (-0700) Subject: menu: fix Ctrl-W (word erase) when editing a command line X-Git-Tag: syslinux-3.83-pre7~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=89564000aceb909fd38893681d82a2647f6b1bc4;p=platform%2Fupstream%2Fsyslinux.git menu: fix Ctrl-W (word erase) when editing a command line The Ctrl-W (word erase) key was broken: it would think the command line got longer, not shorter, resulting in havoc. Signed-off-by: H. Peter Anvin --- diff --git a/com32/menu/menumain.c b/com32/menu/menumain.c index 82f0018..5b568fe 100644 --- a/com32/menu/menumain.c +++ b/com32/menu/menumain.c @@ -527,7 +527,7 @@ static const char *edit_cmdline(const char *input, int top) memmove(cmdline + cursor, cmdline + prevcursor, len - prevcursor + 1); - len -= (cursor - prevcursor); + len -= (prevcursor - cursor); redraw = 1; } break;