comparison src/terminal.c @ 26548:15764dc9a59d v8.2.3803

patch 8.2.3803: GUI: crash with 'writedelay' set using a terminal window Commit: https://github.com/vim/vim/commit/829c8e87e2d99b9d87c9c745e74750177c0298df Author: Bram Moolenaar <Bram@vim.org> Date: Tue Dec 14 08:41:38 2021 +0000 patch 8.2.3803: GUI: crash with 'writedelay' set using a terminal window Problem: Crash when 'writedelay' is set and using a terminal window to execute a shell command. Solution: Check that "tl_vterm" isn't NULL. (closes #9346)
author Bram Moolenaar <Bram@vim.org>
date Tue, 14 Dec 2021 09:45:04 +0100
parents 30abd8e55ee5
children b3ac5a4dc158
comparison
equal deleted inserted replaced
26547:e4dab977c8ad 26548:15764dc9a59d
2099 } 2099 }
2100 2100
2101 /* 2101 /*
2102 * Get a key from the user with terminal mode mappings. 2102 * Get a key from the user with terminal mode mappings.
2103 * Note: while waiting a terminal may be closed and freed if the channel is 2103 * Note: while waiting a terminal may be closed and freed if the channel is
2104 * closed and ++close was used. 2104 * closed and ++close was used. This may even happen before we get here.
2105 */ 2105 */
2106 static int 2106 static int
2107 term_vgetc() 2107 term_vgetc()
2108 { 2108 {
2109 int c; 2109 int c;
2110 int save_State = State; 2110 int save_State = State;
2111 int modify_other_keys = 2111 int modify_other_keys = curbuf->b_term->tl_vterm == NULL ? FALSE
2112 vterm_is_modify_other_keys(curbuf->b_term->tl_vterm); 2112 : vterm_is_modify_other_keys(curbuf->b_term->tl_vterm);
2113 2113
2114 State = TERMINAL; 2114 State = TERMINAL;
2115 got_int = FALSE; 2115 got_int = FALSE;
2116 #ifdef MSWIN 2116 #ifdef MSWIN
2117 ctrl_break_was_pressed = FALSE; 2117 ctrl_break_was_pressed = FALSE;