On 1/7/19 5:10 AM, Eduardo A. Bustamante López wrote: > diff -ruN bash-5.0-rc1.orig/lib/readline/search.c > bash-5.0-rc1/lib/readline/search.c > --- bash-5.0-rc1.orig/lib/readline/search.c 2019-01-03 13:14:43.428392927 > -0800 > +++ bash-5.0-rc1/lib/readline/search.c 2019-01-07 01:39:44.245179141 -0800 > @@ -255,6 +255,8 @@ > rl_maybe_unsave_line (); > rl_clear_message (); > rl_point = cxt->save_point; > + if (rl_point > rl_end) > + rl_point = rl_end; > rl_mark = cxt->save_mark; > rl_restore_prompt ();
Thanks for the catch. > I wonder if this should be a macro or if there is a better way to ensure that > rl_point is never greater than rl_end. This is why _rl_fix_point (int x) exists. Call it with a non-zero value for x if you want it to validate and fix up rl_mark also. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/