To: vim_dev@googlegroups.com Subject: Patch 8.2.0743 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0743 Problem: Can move to another buffer from a terminal in popup window. Solution: Do not allow "gf" or editing a file. (closes #6072) Files: src/normal.c, src/ex_cmds.c, src/testdir/test_popupwin.vim *** ../vim-8.2.0742/src/normal.c 2020-04-12 19:37:13.518297259 +0200 --- src/normal.c 2020-05-12 21:57:39.427271175 +0200 *************** *** 4169,4174 **** --- 4169,4178 ---- clearop(cap->oap); return; } + #ifdef FEAT_PROP_POPUP + if (ERROR_IF_TERM_POPUP_WINDOW) + return; + #endif ptr = grab_file_name(cap->count1, &lnum); *** ../vim-8.2.0742/src/ex_cmds.c 2020-04-20 19:42:06.590078519 +0200 --- src/ex_cmds.c 2020-05-12 21:53:52.872101817 +0200 *************** *** 2484,2489 **** --- 2484,2494 ---- int did_inc_redrawing_disabled = FALSE; long *so_ptr = curwin->w_p_so >= 0 ? &curwin->w_p_so : &p_so; + #ifdef FEAT_PROP_POPUP + if (ERROR_IF_TERM_POPUP_WINDOW) + return FAIL; + #endif + if (eap != NULL) command = eap->do_ecmd_cmd; set_bufref(&old_curbuf, curbuf); *** ../vim-8.2.0742/src/testdir/test_popupwin.vim 2020-04-21 22:19:26.059486839 +0200 --- src/testdir/test_popupwin.vim 2020-05-12 21:58:09.511160646 +0200 *************** *** 2425,2432 **** --- 2425,2440 ---- call assert_equal(winnr(), winnr('k')) call assert_equal(winnr(), winnr('h')) call assert_equal(winnr(), winnr('l')) + " Cannot quit while job is running call assert_fails('call feedkeys("\:quit\", "xt")', 'E948:') + + " Cannot enter Terminal-Normal mode. + call feedkeys("xxx\N", 'xt') + call assert_fails('call feedkeys("gf", "xt")', 'E863:') + call feedkeys("a\", 'xt') + + " Exiting shell closes popup window call feedkeys("exit\", 'xt') " Wait for shell to exit sleep 100m *** ../vim-8.2.0742/src/version.c 2020-05-12 14:41:58.875062794 +0200 --- src/version.c 2020-05-12 21:52:34.116389584 +0200 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 743, /**/ -- From "know your smileys": @:-() Elvis Presley /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///