From 0ddf0a7df0e3a9e966b25150df772b91f32182f8 Mon Sep 17 00:00:00 2001
From: Bram Moolenaar <Bram@vim.org>
Date: Tue, 1 May 2007 20:04:53 +0000
Subject: [PATCH] updated for version 7.0-238

---
 src/screen.c  | 10 ++++++++--
 src/version.c |  2 ++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/screen.c b/src/screen.c
index b3b98bf65a..eb7a63ae21 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -6477,9 +6477,15 @@ next_search_hl(win, shl, lnum, mincol)
 	if (called_emsg)
 	{
 	    /* Error while handling regexp: stop using this regexp. */
-	    vim_free(shl->rm.regprog);
+	    if (shl == &search_hl)
+	    {
+		/* don't free the regprog in match_hl[], it's a copy */
+		vim_free(shl->rm.regprog);
+		no_hlsearch = TRUE;
+	    }
 	    shl->rm.regprog = NULL;
-	    no_hlsearch = TRUE;
+	    shl->lnum = 0;
+	    got_int = FALSE;  /* avoid the "Type :quit to exit Vim" message */
 	    break;
 	}
 	if (nmatched == 0)
diff --git a/src/version.c b/src/version.c
index ee864a8e7c..d61acc7a98 100644
--- a/src/version.c
+++ b/src/version.c
@@ -666,6 +666,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    238,
 /**/
     237,
 /**/
-- 
GitLab