comparison src/syntax.c @ 30831:fbeebe308514 v9.0.0750

patch 9.0.0750: crash when popup closed in callback Commit: https://github.com/vim/vim/commit/0abd6cf62d65180dc2c40d67cd95f13b0691f7ea Author: Bram Moolenaar <Bram@vim.org> Date: Fri Oct 14 17:04:09 2022 +0100 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.
author Bram Moolenaar <Bram@vim.org>
date Fri, 14 Oct 2022 18:15:03 +0200
parents 029c59bf78f1
children 684e6dfa2fba
comparison
equal deleted inserted replaced
30830:22917862ac81 30831:fbeebe308514
1540 * displayed line 1540 * displayed line
1541 * displayed line 1541 * displayed line
1542 * lnum -> line below window 1542 * lnum -> line below window
1543 */ 1543 */
1544 void 1544 void
1545 syntax_end_parsing(linenr_T lnum) 1545 syntax_end_parsing(win_T *wp, linenr_T lnum)
1546 { 1546 {
1547 synstate_T *sp; 1547 synstate_T *sp;
1548 1548
1549 if (syn_block != wp->w_s)
1550 return; // not the right window
1549 sp = syn_stack_find_entry(lnum); 1551 sp = syn_stack_find_entry(lnum);
1550 if (sp != NULL && sp->sst_lnum < lnum) 1552 if (sp != NULL && sp->sst_lnum < lnum)
1551 sp = sp->sst_next; 1553 sp = sp->sst_next;
1552 1554
1553 if (sp != NULL && sp->sst_change_lnum != 0) 1555 if (sp != NULL && sp->sst_change_lnum != 0)