From b3519ca73b37879f1b43230d0e1903fdc5c64547 Mon Sep 17 00:00:00 2001 From: David Bürgin <676c7473@gmail.com> Date: Fri, 3 Apr 2015 21:08:49 +0200 Subject: vim-patch:7.4.519 Problem: Crash when using syntax highlighting. Solution: When regprog is freed and replaced, store the result. https://github.com/vim/vim/tree/v7-4-519 Helped-by: Scott Prager --- src/nvim/ex_cmds2.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/nvim/ex_cmds2.c') diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c index a2577513d4..98e6d87196 100644 --- a/src/nvim/ex_cmds2.c +++ b/src/nvim/ex_cmds2.c @@ -687,7 +687,6 @@ debuggy_find ( { struct debuggy *bp; linenr_T lnum = 0; - regmatch_T regmatch; char_u *name = fname; int prev_got_int; @@ -709,8 +708,6 @@ debuggy_find ( if (((bp->dbg_type == DBG_FILE) == file && ( gap == &prof_ga || (bp->dbg_lnum > after && (lnum == 0 || bp->dbg_lnum < lnum))))) { - regmatch.regprog = bp->dbg_prog; - regmatch.rm_ic = FALSE; /* * Save the value of got_int and reset it. We don't want a * previous interruption cancel matching, only hitting CTRL-C @@ -718,7 +715,7 @@ debuggy_find ( */ prev_got_int = got_int; got_int = FALSE; - if (vim_regexec(®match, name, (colnr_T)0)) { + if (vim_regexec_prog(&bp->dbg_prog, false, name, (colnr_T)0)) { lnum = bp->dbg_lnum; if (fp != NULL) *fp = bp->dbg_forceit; -- cgit