aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-08-13 22:31:13 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-08-13 22:31:13 -0700
commit89564000aceb909fd38893681d82a2647f6b1bc4 (patch)
tree1741b831f7cab147b80dd9e3e6c6672857b4b0fd
parent77632adf09dbf7d4d72ce3763566f1dade3bb0e2 (diff)
downloadlwip-89564000aceb909fd38893681d82a2647f6b1bc4.tar.gz
lwip-89564000aceb909fd38893681d82a2647f6b1bc4.tar.xz
lwip-89564000aceb909fd38893681d82a2647f6b1bc4.zip
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 <hpa@zytor.com>
-rw-r--r--com32/menu/menumain.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/com32/menu/menumain.c b/com32/menu/menumain.c
index 82f0018c..5b568feb 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;