summaryrefslogtreecommitdiff
path: root/undo.c
diff options
context:
space:
mode:
Diffstat (limited to 'undo.c')
-rw-r--r--undo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/undo.c b/undo.c
index e4c457d..492894c 100644
--- a/undo.c
+++ b/undo.c
@@ -116,12 +116,14 @@ _rl_free_undo_list (UNDO_LIST *ul)
void
rl_free_undo_list (void)
{
- UNDO_LIST *release, *orig_list;
+ UNDO_LIST *orig_list;
orig_list = rl_undo_list;
_rl_free_undo_list (rl_undo_list);
rl_undo_list = (UNDO_LIST *)NULL;
_hs_replace_history_data (-1, (histdata_t *)orig_list, (histdata_t *)NULL);
+ if (_rl_saved_line_for_history && (UNDO_LIST *)_rl_saved_line_for_history->data == orig_list)
+ _rl_saved_line_for_history->data = 0;
}
UNDO_LIST *