]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
edit: Fix history processing on running old command
authorJouni Malinen <j@w1.fi>
Sun, 5 May 2013 10:09:55 +0000 (13:09 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 5 May 2013 10:09:55 +0000 (13:09 +0300)
currbuf_valid needs to be cleared when an old command from history is
processed to avoid leaving a bogus entry that makes history_prev() skip
the last entry in history.

Signed-hostap: Jouni Malinen <j@w1.fi>

src/utils/edit.c

index b01e08dfc2a92775fd6ec11cc6525ac5c285b301..177ecf41d4ecd2dc875d979f76ad99968d52f375 100644 (file)
@@ -345,7 +345,7 @@ static void insert_char(int c)
 
 static void process_cmd(void)
 {
-
+       currbuf_valid = 0;
        if (cmdbuf_len == 0) {
                printf("\n%s> ", ps2 ? ps2 : "");
                fflush(stdout);