Mercurial > vim
diff 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 |
line wrap: on
line diff
--- a/src/testdir/test_popupwin.vim +++ b/src/testdir/test_popupwin.vim @@ -1539,6 +1539,23 @@ func Test_popup_filter() call popup_clear() endfunc +" this tests that the "ex_normal_busy_done" flag works +func Test_popup_filter_normal_cmd() + CheckScreendump + + let lines =<< trim END + let g:winid = popup_create('some text', {'filter': 'invalidfilter'}) + call timer_start(0, {-> win_execute(g:winid, 'norm! zz')}) + END + call writefile(lines, 'XtestPopupNormal') + let buf = RunVimInTerminal('-S XtestPopupNormal', #{rows: 10}) + call TermWait(buf, 100) + call VerifyScreenDump(buf, 'Test_popupwin_normal_cmd', {}) + + call StopVimInTerminal(buf) + call delete('XtestPopupNormal') +endfunc + func ShowDialog(key, result) let s:cb_res = 999 let winid = popup_dialog('do you want to quit (Yes/no)?', #{