From 89564000aceb909fd38893681d82a2647f6b1bc4 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Thu, 13 Aug 2009 22:31:13 -0700 Subject: [PATCH] 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 --- com32/menu/menumain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.7.4