From c7040a5615827cefe0edbdf7f69c6640fa1aa1e1 Mon Sep 17 00:00:00 2001
From: Bram Moolenaar <Bram@vim.org>
Date: Tue, 20 Jul 2010 13:11:28 +0200
Subject: [PATCH] Fix: When 'searchhl' causes a hang make CTRL-C disable
 'shearchhl'.

---
 runtime/doc/todo.txt | 8 ++------
 src/screen.c         | 2 +-
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 3aa38987e4..40d4b672a7 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -30,16 +30,12 @@ be worked on, but only if you sponsor Vim development.  See |sponsor|.
 							*known-bugs*
 -------------------- Known bugs and current work -----------------------
 
-Update syntax menus: run checkmenu.
-
-GTK: torn-off menu doesn't work.
-
-:find completion has duplicates. (Bjorn Winckler, 2010 Jul 18)
+GTK: torn-off menu doesn't work.  Because of patch for file selector?
 
 Win64: diff.exe crashes on Win64. (Julianne Bailey, 2006 Dec 12)
 Build another diff.exe somehow?
 
-Hang in search HL, CTRL-C should clear it. (Dimitar Dimitrov, 2010 Jul 19)
+:find completion has duplicates. (Bjorn Winckler, 2010 Jul 18)
 
 Conceal: don't show for 'hlmatch' when 'modifiable' is off?
 And don't care about 'cursorline'.
diff --git a/src/screen.c b/src/screen.c
index ac531d4858..db26046ae5 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -7119,7 +7119,7 @@ next_search_hl(win, shl, lnum, mincol)
 		NULL
 #endif
 		);
-	if (called_emsg)
+	if (called_emsg || got_int)
 	{
 	    /* Error while handling regexp: stop using this regexp. */
 	    if (shl == &search_hl)
-- 
GitLab