Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: History and vared



On Sat, 15 Sep 2001, Bart Schaefer wrote:
> On Aug 14, I wrote:
> } (no -h argument to vared), history-incremental-search-backward is able
> } to run off into the history if it doesn't find the search string in the
> } current buffer.

Thanks for the reminder -- I must have missed that comment the first
time around.  Here's the fix.

..wayne..

---8<------8<------8<------8<---cut here--->8------>8------>8------>8---
Index: Src/Zle/zle_hist.c
--- Src/Zle/zle_hist.c	2001/09/03 01:39:20	1.5
+++ Src/Zle/zle_hist.c	2001/09/17 18:06:25
@@ -720,7 +720,8 @@
 		    statusline = ibuf + NORM_PROMPT_POS;
 		    break;
 		}
-		if (!(he = movehistent(he, dir, hist_skip_flags))) {
+		if (!(zlereadflags & ZLRF_HISTORY)
+		 || !(he = movehistent(he, dir, hist_skip_flags))) {
 		    if (sbptr == (int)isrch_spots[top_spot-1].len
 		     && (isrch_spots[top_spot-1].flags & ISS_FAILING))
 			top_spot--;
---8<------8<------8<------8<---cut here--->8------>8------>8------>8---



Messages sorted by: Reverse Date, Date, Thread, Author