0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 9.0.0750: crash when popup closed in callback

Problem:    Crash when popup closed in callback. (Maxim Kim)
Solution:   In syntax_end_parsing() check that syn_block is valid.
This commit is contained in:
Bram Moolenaar
2022-10-14 17:04:09 +01:00
parent 975a665d48
commit 0abd6cf62d
4 changed files with 8 additions and 4 deletions

View File

@@ -1542,10 +1542,12 @@ syn_stack_equal(synstate_T *sp)
* lnum -> line below window
*/
void
syntax_end_parsing(linenr_T lnum)
syntax_end_parsing(win_T *wp, linenr_T lnum)
{
synstate_T *sp;
if (syn_block != wp->w_s)
return; // not the right window
sp = syn_stack_find_entry(lnum);
if (sp != NULL && sp->sst_lnum < lnum)
sp = sp->sst_next;