7 Bug-Reported-by: lessbug@qq.com
8 Bug-Reference-ID: <tencent_6AA531D9A5CC4121D86BD5CDA2E0DA98C605@qq.com>
13 When using previous-history to go back beyond the beginning of the history list,
14 it's possible to move to an incorrect partial line.
16 Patch (apply with `patch -p0'):
18 *** ../bash-5.0-patched/lib/readline/misc.c 2017-07-07 17:30:12.000000000 -0400
19 --- lib/readline/misc.c 2019-05-16 11:43:46.000000000 -0400
24 HIST_ENTRY *old_temp, *temp;
32 /* If we don't have a line saved, then save this one. */
33 + had_saved_line = _rl_saved_line_for_history != 0;
34 rl_maybe_save_line ();
40 ! rl_maybe_unsave_line ();
46 ! if (had_saved_line == 0)
47 ! _rl_free_saved_history_line ();
50 *** ../bash-5.0/patchlevel.h 2016-06-22 14:51:03.000000000 -0400
51 --- patchlevel.h 2016-10-01 11:01:28.000000000 -0400
54 looks for to find the patch level (for the sccs version string). */
56 ! #define PATCHLEVEL 11
58 #endif /* _PATCHLEVEL_H_ */
60 looks for to find the patch level (for the sccs version string). */
62 ! #define PATCHLEVEL 12
64 #endif /* _PATCHLEVEL_H_ */