bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch] history saved-line handling


From: Tim Waugh
Subject: [patch] history saved-line handling
Date: Thu, 26 Aug 2004 13:40:25 +0100
User-agent: Mutt/1.4.1i

Hi,

Here is a (hopefully obvious) patch against bash-3.0 to fix history
handling.  The 'current line' (i.e. saved_line_for_history) was being
overwritten each time the user presses the up arrow.

Tim.
*/

--- bash-3.0/lib/readline/misc.c.history        2004-08-26 13:17:22.490788104 
+0100
+++ bash-3.0/lib/readline/misc.c        2004-08-26 13:17:23.456601151 +0100
@@ -276,7 +276,7 @@
       _rl_saved_line_for_history->line = savestring (rl_line_buffer);
       _rl_saved_line_for_history->data = (char *)rl_undo_list;
     }
-  else if (STREQ (rl_line_buffer, _rl_saved_line_for_history->line) == 0)
+  else if (STREQ (rl_line_buffer, _rl_saved_line_for_history->line))
     {
       free (_rl_saved_line_for_history->line);
       _rl_saved_line_for_history->line = savestring (rl_line_buffer);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]