Commit c92843b5dfc1e8f7baace9b7a4eac3e3231ac73e

Authored by ths
1 parent be0164f2

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
Showing 1 changed file with 4 additions and 0 deletions
readline.c
@@ -374,6 +374,10 @@ void readline_handle_byte(int ch) @@ -374,6 +374,10 @@ void readline_handle_byte(int ch)
374 if (!term_is_password) 374 if (!term_is_password)
375 term_hist_add(term_cmd_buf); 375 term_hist_add(term_cmd_buf);
376 term_printf("\n"); 376 term_printf("\n");
  377 + term_cmd_buf_index = 0;
  378 + term_cmd_buf_size = 0;
  379 + term_last_cmd_buf_index = 0;
  380 + term_last_cmd_buf_size = 0;
377 /* NOTE: readline_start can be called here */ 381 /* NOTE: readline_start can be called here */
378 term_readline_func(term_readline_opaque, term_cmd_buf); 382 term_readline_func(term_readline_opaque, term_cmd_buf);
379 break; 383 break;