aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/search.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/search.c')
-rw-r--r--src/nvim/search.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c
index 0d4ab8d63c..4fc5ac93aa 100644
--- a/src/nvim/search.c
+++ b/src/nvim/search.c
@@ -6017,3 +6017,9 @@ bool search_was_last_used(void)
{
return last_idx == 0;
}
+
+/// @return true if 'hlsearch' highlight is currently in use.
+bool using_hlsearch(void)
+{
+ return spats[last_idx].pat != NULL && p_hls && !no_hlsearch;
+}