[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
previous-history clobbers last history line
From: |
schwab |
Subject: |
previous-history clobbers last history line |
Date: |
Sun, 1 Aug 2004 10:55:35 +0200 (CEST) |
Configuration Information [Automatically generated, do not change]:
Machine: ia64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='ia64'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='ia64-unknown-linux-gnu'
-DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/local/share/locale' -DPACKAGE='bash'
-DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -O2 -g
uname output: Linux sykes 2.6.5-22-default #1 SMP Fri Jul 2 13:43:23 UTC 2004
ia64 ia64 ia64 GNU/Linux
Machine Type: ia64-unknown-linux-gnu
Bash Version: 3.0
Patch Level: 0
Release Status: release
Description:
Moving upwards in the history (with previous-history) and back again
clobbers the last history line.
Repeat-By:
Type C-p (previous-history) twice and move back.
Fix:
diff -ur bash-3.0/lib/readline/misc.c bash-3.0-rc1/lib/readline/misc.c
--- bash-3.0/lib/readline/misc.c 2004-07-07 14:56:32.000000000 +0200
+++ bash-3.0-rc1/lib/readline/misc.c 2004-03-22 14:27:23.000000000 +0100
@@ -276,13 +276,6 @@
_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)
- {
- free (_rl_saved_line_for_history->line);
- _rl_saved_line_for_history->line = savestring (rl_line_buffer);
- _rl_saved_line_for_history->data = (char *)rl_undo_list; /* XXX possible
memleak */
- }
-
return 0;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- previous-history clobbers last history line,
schwab <=