comparison src/testdir/test_cmdline.vim @ 28427:96d53065f309 v8.2.4738

patch 8.2.4738: Esc on commandline executes command instead of abandoning it Commit: https://github.com/vim/vim/commit/11a57dfd16a47f248fe949344bd5db3f12b9bd32 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Apr 11 19:38:56 2022 +0100 patch 8.2.4738: Esc on commandline executes command instead of abandoning it Problem: Esc on commandline executes command instead of abandoning it. Solution: Save and restore KeyTyped when removing the popup menu. (closes #10154)
author Bram Moolenaar <Bram@vim.org>
date Mon, 11 Apr 2022 20:45:02 +0200
parents d32dc906dd2c
children 80085afc2f4d
comparison
equal deleted inserted replaced
28426:b6813029efe9 28427:96d53065f309
2508 call assert_equal('"sign define0', @:) 2508 call assert_equal('"sign define0', @:)
2509 set nowildmenu wildoptions& 2509 set nowildmenu wildoptions&
2510 cunmap <F2> 2510 cunmap <F2>
2511 endfunc 2511 endfunc
2512 2512
2513 func Test_wildmenu_with_pum_foldexpr()
2514 CheckRunVimInTerminal
2515
2516 let lines =<< trim END
2517 call setline(1, ['folded one', 'folded two', 'some more text'])
2518 func MyFoldText()
2519 return 'foo'
2520 endfunc
2521 set foldtext=MyFoldText() wildoptions=pum
2522 normal ggzfj
2523 END
2524 call writefile(lines, 'Xpumfold')
2525 let buf = RunVimInTerminal('-S Xpumfold', #{rows: 10})
2526 call term_sendkeys(buf, ":set\<Tab>")
2527 call VerifyScreenDump(buf, 'Test_wildmenu_with_pum_foldexpr_1', {})
2528
2529 call term_sendkeys(buf, "\<Esc>")
2530 call VerifyScreenDump(buf, 'Test_wildmenu_with_pum_foldexpr_2', {})
2531
2532 call StopVimInTerminal(buf)
2533 call delete('Xpumfold')
2534 endfunc
2535
2513 " Test for opening the cmdline completion popup menu from the terminal window. 2536 " Test for opening the cmdline completion popup menu from the terminal window.
2514 " The popup menu should be positioned correctly over the status line of the 2537 " The popup menu should be positioned correctly over the status line of the
2515 " bottom-most window. 2538 " bottom-most window.
2516 func Test_wildmenu_pum_from_terminal() 2539 func Test_wildmenu_pum_from_terminal()
2517 CheckRunVimInTerminal 2540 CheckRunVimInTerminal