Mercurial > vim
comparison src/testdir/test_popupwin.vim @ 22361:00f2eebe74d9 v8.2.1729
patch 8.2.1729: endless loop when ":normal" feeds popup window filter
Commit: https://github.com/vim/vim/commit/189832bf661168df7ebd428e4088737718775fbd
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Sep 23 12:29:11 2020 +0200
patch 8.2.1729: endless loop when ":normal" feeds popup window filter
Problem: Endless loop when ":normal" feeds popup window filter.
Solution: Add the ex_normal_busy_done flag.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 23 Sep 2020 12:30:04 +0200 |
parents | 0e231e8e70f8 |
children | 997bbc35c181 |
comparison
equal
deleted
inserted
replaced
22360:d55224e63208 | 22361:00f2eebe74d9 |
---|---|
1535 call assert_equal("\<F9>", g:eaten) | 1535 call assert_equal("\<F9>", g:eaten) |
1536 call assert_equal(-1, winbufnr(winid)) | 1536 call assert_equal(-1, winbufnr(winid)) |
1537 | 1537 |
1538 delfunc MyPopupFilter | 1538 delfunc MyPopupFilter |
1539 call popup_clear() | 1539 call popup_clear() |
1540 endfunc | |
1541 | |
1542 " this tests that the "ex_normal_busy_done" flag works | |
1543 func Test_popup_filter_normal_cmd() | |
1544 CheckScreendump | |
1545 | |
1546 let lines =<< trim END | |
1547 let g:winid = popup_create('some text', {'filter': 'invalidfilter'}) | |
1548 call timer_start(0, {-> win_execute(g:winid, 'norm! zz')}) | |
1549 END | |
1550 call writefile(lines, 'XtestPopupNormal') | |
1551 let buf = RunVimInTerminal('-S XtestPopupNormal', #{rows: 10}) | |
1552 call TermWait(buf, 100) | |
1553 call VerifyScreenDump(buf, 'Test_popupwin_normal_cmd', {}) | |
1554 | |
1555 call StopVimInTerminal(buf) | |
1556 call delete('XtestPopupNormal') | |
1540 endfunc | 1557 endfunc |
1541 | 1558 |
1542 func ShowDialog(key, result) | 1559 func ShowDialog(key, result) |
1543 let s:cb_res = 999 | 1560 let s:cb_res = 999 |
1544 let winid = popup_dialog('do you want to quit (Yes/no)?', #{ | 1561 let winid = popup_dialog('do you want to quit (Yes/no)?', #{ |