summaryrefslogtreecommitdiff
path: root/data/readline/readline80-002.diff
diff options
context:
space:
mode:
authorSam Bingner <sam@bingner.com>2020-07-17 00:00:12 -1000
committerSam Bingner <sam@bingner.com>2020-08-04 12:40:38 -1000
commitfc62968b1d6979799805dd8e55a4017c3a1e087c (patch)
tree4c75a19cfbde7531ce960a8b88292a0f2715025c /data/readline/readline80-002.diff
parent999cb8e823c8448056b541943c5ee6ead7282384 (diff)
Update readline to 8.0.004
Diffstat (limited to 'data/readline/readline80-002.diff')
-rw-r--r--data/readline/readline80-002.diff60
1 files changed, 60 insertions, 0 deletions
diff --git a/data/readline/readline80-002.diff b/data/readline/readline80-002.diff
new file mode 100644
index 000000000..135576e57
--- /dev/null
+++ b/data/readline/readline80-002.diff
@@ -0,0 +1,60 @@
+ READLINE PATCH REPORT
+ =====================
+
+Readline-Release: 8.0
+Patch-ID: readline80-002
+
+Bug-Reported-by: lessbug@qq.com
+Bug-Reference-ID: <tencent_6AA531D9A5CC4121D86BD5CDA2E0DA98C605@qq.com>
+Bug-Reference-URL:
+
+Bug-Description:
+
+When using previous-history to go back beyond the beginning of the history list,
+it's possible to move to an incorrect partial line.
+
+Patch (apply with `patch -p0'):
+
+*** ../readline-8.0-patched/misc.c 2017-07-07 17:30:12.000000000 -0400
+--- ../misc.c 2019-05-16 11:43:46.000000000 -0400
+***************
+*** 577,580 ****
+--- 590,594 ----
+ {
+ HIST_ENTRY *old_temp, *temp;
++ int had_saved_line;
+
+ if (count < 0)
+***************
+*** 589,592 ****
+--- 603,607 ----
+
+ /* If we don't have a line saved, then save this one. */
++ had_saved_line = _rl_saved_line_for_history != 0;
+ rl_maybe_save_line ();
+
+***************
+*** 612,616 ****
+ if (temp == 0)
+ {
+! rl_maybe_unsave_line ();
+ rl_ding ();
+ }
+--- 627,632 ----
+ if (temp == 0)
+ {
+! if (had_saved_line == 0)
+! _rl_free_saved_history_line ();
+ rl_ding ();
+ }
+*** ../readline-8.0/patchlevel 2013-11-15 08:11:11.000000000 -0500
+--- ../patchlevel 2014-03-21 08:28:40.000000000 -0400
+***************
+*** 1,3 ****
+ # Do not edit -- exists only for use by patch
+
+! 1
+--- 1,3 ----
+ # Do not edit -- exists only for use by patch
+
+! 2