aboutsummaryrefslogtreecommitdiff
path: root/Src/Zle/zle_params.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Zle/zle_params.c')
-rw-r--r--Src/Zle/zle_params.c12
1 files changed, 12 insertions, 0 deletions
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 "";
+}