From 89eb6b774dbde630cf66ba24c5ebeb5917978f6b Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 20 Nov 2010 11:48:00 +0200 Subject: [PATCH] edit: Fix delete word to update current position --- src/utils/edit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils/edit.c b/src/utils/edit.c index a43cf2fe6..eed2b534e 100644 --- a/src/utils/edit.c +++ b/src/utils/edit.c @@ -132,6 +132,8 @@ static void delete_word(void) cmdbuf_len--; while (cmdbuf_len > 0 && cmdbuf[cmdbuf_len - 1] != ' ') cmdbuf_len--; + if (cmdbuf_pos > cmdbuf_len) + cmdbuf_pos = cmdbuf_len; edit_redraw(); }