diff options
Diffstat (limited to 'src/nvim/search.c')
-rw-r--r-- | src/nvim/search.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c index 89a7752e9f..9ae5754f80 100644 --- a/src/nvim/search.c +++ b/src/nvim/search.c @@ -335,6 +335,12 @@ restore_last_search_pattern(void) SET_NO_HLSEARCH(saved_no_hlsearch); } + char_u * +last_search_pattern(void) +{ + return spats[RE_SEARCH].pat; +} + /* * Return TRUE when case should be ignored for search pattern "pat". * Uses the 'ignorecase' and 'smartcase' options. |