diff liboctave/util/cmd-edit.h @ 19702:c048358da712

also kill pending input line when gui command window is cleared (bug #44015) * oct-rl-edit.h, oct-rl-edit.c (octave_rl_kill_full_line): New function. * cmd-edit.h, cmd-edit.cc (command_editor::kill_full_line, command_editor::do_kill_full_line, gnu_readline::do_kill_full_line, default_command_editor::do_kill_full_line): New functions. * main-window.cc (main_window::clear_command_window_callback): Kill pending input line before clearing screen.
author John W. Eaton <jwe@octave.org>
date Thu, 12 Feb 2015 14:32:01 -0500
parents 4197fc428c7d
children f7084eae3318
line wrap: on
line diff
--- a/liboctave/util/cmd-edit.h	Thu Feb 12 14:12:43 2015 -0500
+++ b/liboctave/util/cmd-edit.h	Thu Feb 12 14:32:01 2015 -0500
@@ -133,6 +133,8 @@
 
   static void replace_line (const std::string& text, bool clear_undo = true);
 
+  static void kill_full_line (void);
+
   static void insert_text (const std::string& text);
 
   static void newline (void);
@@ -309,6 +311,8 @@
 
   virtual void do_replace_line (const std::string& text, bool clear_undo) = 0;
 
+  virtual void do_kill_full_line (void) = 0;
+
   virtual void do_insert_text (const std::string& text) = 0;
 
   virtual void do_newline (void) = 0;