From e91067d966f719803dae5db08addf7fa5748462b Mon Sep 17 00:00:00 2001 From: Felix Rosencrantz Date: Fri, 6 Dec 2002 23:24:06 +0000 Subject: 17983: Added zle LASTSEARCJ parameter --- Src/Zle/zle_params.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Src/Zle/zle_params.c') diff --git a/Src/Zle/zle_params.c b/Src/Zle/zle_params.c index 1987974d2..c8b518cbf 100644 --- a/Src/Zle/zle_params.c +++ b/Src/Zle/zle_params.c @@ -89,6 +89,8 @@ static struct zleparam { zleunsetfn, NULL }, { "POSTDISPLAY", PM_SCALAR, FN(set_postdisplay), FN(get_postdisplay), zleunsetfn, NULL }, + { "LASTSEARCH", PM_SCALAR | PM_READONLY, NULL, FN(get_lsearch), + zleunsetfn, NULL }, { NULL, 0, NULL, NULL, NULL, NULL } }; @@ -526,3 +528,13 @@ free_prepostdisplay(void) if (postdisplaylen) set_prepost(&postdisplay, &postdisplaylen, NULL); } + +/**/ +static char * +get_lsearch(Param pm) +{ + if (previous_search_len) + return metafy(previous_search, previous_search_len, META_HEAPDUP); + else + return ""; +} -- cgit 1.4.1