comparison src/terminal.c @ 24739:68e3adbeaf20 v8.2.2908

patch 8.2.2908: crash when using a terminal popup window from cmdline window Commit: https://github.com/vim/vim/commit/e5b4486c4279a9674a9bb76130b4db53fb9303a0 Author: Bram Moolenaar <Bram@vim.org> Date: Sun May 30 13:54:03 2021 +0200 patch 8.2.2908: crash when using a terminal popup window from cmdline window Problem: Crash when using a terminal popup window from the cmdline window. Solution: Instead of checking cmdwin_type call cmdwin_is_active(). (closes #8286)
author Bram Moolenaar <Bram@vim.org>
date Sun, 30 May 2021 14:00:05 +0200
parents d957c7bbacf3
children 7334bf933510
comparison
equal deleted inserted replaced
24738:cd3c2a881ff2 24739:68e3adbeaf20
443 int vertical = opt->jo_vertical || (cmdmod.cmod_split & WSP_VERT); 443 int vertical = opt->jo_vertical || (cmdmod.cmod_split & WSP_VERT);
444 jobopt_T orig_opt; // only partly filled 444 jobopt_T orig_opt; // only partly filled
445 445
446 if (check_restricted() || check_secure()) 446 if (check_restricted() || check_secure())
447 return NULL; 447 return NULL;
448 #ifdef FEAT_CMDWIN
449 if (cmdwin_type != 0)
450 {
451 emsg(_(e_cannot_open_terminal_from_command_line_window));
452 return NULL;
453 }
454 #endif
448 455
449 if ((opt->jo_set & (JO_IN_IO + JO_OUT_IO + JO_ERR_IO)) 456 if ((opt->jo_set & (JO_IN_IO + JO_OUT_IO + JO_ERR_IO))
450 == (JO_IN_IO + JO_OUT_IO + JO_ERR_IO) 457 == (JO_IN_IO + JO_OUT_IO + JO_ERR_IO)
451 || (!(opt->jo_set & JO_OUT_IO) && (opt->jo_set & JO_OUT_BUF)) 458 || (!(opt->jo_set & JO_OUT_IO) && (opt->jo_set & JO_OUT_BUF))
452 || (!(opt->jo_set & JO_ERR_IO) && (opt->jo_set & JO_ERR_BUF)) 459 || (!(opt->jo_set & JO_ERR_IO) && (opt->jo_set & JO_ERR_BUF))