summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-08-26 17:33:53 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-08-26 17:33:53 +0000
commitc92843b5dfc1e8f7baace9b7a4eac3e3231ac73e (patch)
tree3d4139a91d7f3fd314c83b53cb8a668df9fba3a8 /readline.c
parentSet apic instance number for savevm, by Ari Kivity. (diff)
downloadqemu-kvm-c92843b5dfc1e8f7baace9b7a4eac3e3231ac73e.tar.gz
qemu-kvm-c92843b5dfc1e8f7baace9b7a4eac3e3231ac73e.tar.bz2
qemu-kvm-c92843b5dfc1e8f7baace9b7a4eac3e3231ac73e.zip
Reset buffer pointers after CR/LF, by Jim Paris.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3145 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'readline.c')
-rw-r--r--readline.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/readline.c b/readline.c
index 25572dd02..577881a19 100644
--- a/readline.c
+++ b/readline.c
@@ -374,6 +374,10 @@ void readline_handle_byte(int ch)
if (!term_is_password)
term_hist_add(term_cmd_buf);
term_printf("\n");
+ term_cmd_buf_index = 0;
+ term_cmd_buf_size = 0;
+ term_last_cmd_buf_index = 0;
+ term_last_cmd_buf_size = 0;
/* NOTE: readline_start can be called here */
term_readline_func(term_readline_opaque, term_cmd_buf);
break;