diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-09-27 20:13:03 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-09-27 20:13:03 +0200 |
commit | d0e1b7103c14eb0d175c6b245b4b6ed93a204da9 (patch) | |
tree | 16bd1d7d65bc1c2a5538c8e48ac11982ef540352 /src/testdir/test_ins_complete.vim | |
parent | ac564082f118ccdca828980c5f10b65a40bffb4d (diff) |
patch 8.2.1762: when a timer uses :stopinsert completion isn't stoppedv8.2.1762
Problem: When a timer uses :stopinsert Insert mode completion isn't
stopped. (Stanley Chan)
Solution: Call ins_compl_prep(ESC).
Diffstat (limited to 'src/testdir/test_ins_complete.vim')
-rw-r--r-- | src/testdir/test_ins_complete.vim | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/testdir/test_ins_complete.vim b/src/testdir/test_ins_complete.vim index f77512ae18..005e14caf0 100644 --- a/src/testdir/test_ins_complete.vim +++ b/src/testdir/test_ins_complete.vim @@ -407,6 +407,28 @@ func Test_ins_completeslash() set completeslash= endfunc +func Test_pum_stopped_by_timer() + CheckScreendump + + let lines =<< trim END + call setline(1, ['hello', 'hullo', 'heeee', '']) + func StartCompl() + call timer_start(100, { -> execute('stopinsert') }) + call feedkeys("Gah\<C-N>") + endfunc + END + + call writefile(lines, 'Xpumscript') + let buf = RunVimInTerminal('-S Xpumscript', #{rows: 12}) + call term_sendkeys(buf, ":call StartCompl()\<CR>") + call TermWait(buf, 200) + call term_sendkeys(buf, "k") + call VerifyScreenDump(buf, 'Test_pum_stopped_by_timer', {}) + + call StopVimInTerminal(buf) + call delete('Xpumscript') +endfunc + func Test_pum_with_folds_two_tabs() CheckScreendump |