0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -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

@@ -2486,7 +2486,7 @@ win_update(win_T *wp)
// Let the syntax stuff know we skipped a few lines.
if (syntax_last_parsed != 0 && syntax_last_parsed + 1 < lnum
&& syntax_present(wp))
syntax_end_parsing(syntax_last_parsed + 1);
syntax_end_parsing(wp, syntax_last_parsed + 1);
#endif
// Display one line.
@@ -2601,7 +2601,7 @@ win_update(win_T *wp)
#ifdef FEAT_SYN_HL
// Let the syntax stuff know we stop parsing here.
if (syntax_last_parsed != 0 && syntax_present(wp))
syntax_end_parsing(syntax_last_parsed + 1);
syntax_end_parsing(wp, syntax_last_parsed + 1);
#endif
// If we didn't hit the end of the file, and we didn't finish the last