To: vim_dev@googlegroups.com Subject: Patch 8.2.4814 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4814 Problem: Possible to leave a popup window with win_gotoid(). Solution: Give an error when trying to leave a popup window with win_gotoid(). (closes #10253) Files: src/evalwindow.c, src/testdir/test_terminal3.vim *** ../vim-8.2.4813/src/evalwindow.c 2022-04-20 19:00:32.849452382 +0100 --- src/evalwindow.c 2022-04-23 14:03:50.906911589 +0100 *************** *** 817,822 **** --- 817,829 ---- return; } #endif + #if defined(FEAT_PROP_POPUP) && defined(FEAT_TERMINAL) + if (popup_is_popup(curwin) && curbuf->b_term != NULL) + { + emsg(_(e_not_allowed_for_terminal_in_popup_window)); + return; + } + #endif FOR_ALL_TAB_WINDOWS(tp, wp) if (wp->w_id == id) { *** ../vim-8.2.4813/src/testdir/test_terminal3.vim 2022-01-14 12:06:43.731420951 +0000 --- src/testdir/test_terminal3.vim 2022-04-23 14:03:50.906911589 +0100 *************** *** 528,533 **** --- 528,545 ---- exe buf2 .. 'bwipe!' endfunc + func Test_escape_popup_terminal() + set hidden + + " Cannot escape a terminal popup window using win_gotoid + let prev_win = win_getid() + eval term_start('sh', #{hidden: 1, term_finish: 'close'})->popup_create({}) + call assert_fails("call win_gotoid(" .. prev_win .. ")", 'E863:') + + call popup_clear(1) + set hidden& + endfunc + func Test_issue_5607() let wincount = winnr('$') exe 'terminal' &shell &shellcmdflag 'exit' *** ../vim-8.2.4813/src/version.c 2022-04-23 13:50:11.155455199 +0100 --- src/version.c 2022-04-23 14:06:05.558770639 +0100 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 4814, /**/ -- It is hard to understand how a cemetery raised its burial cost and blamed it on the cost of living. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///