Mercurial > vim
comparison src/testdir/test_ins_complete.vim @ 22427:58cdc5d7f143 v8.2.1762
patch 8.2.1762: when a timer uses :stopinsert completion isn't stopped
Commit: https://github.com/vim/vim/commit/d0e1b7103c14eb0d175c6b245b4b6ed93a204da9
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Sep 27 20:13:03 2020 +0200
patch 8.2.1762: when a timer uses :stopinsert completion isn't stopped
Problem: When a timer uses :stopinsert Insert mode completion isn't
stopped. (Stanley Chan)
Solution: Call ins_compl_prep(ESC).
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 27 Sep 2020 20:15:03 +0200 |
parents | 0a5770061295 |
children | ba3f547dc490 |
comparison
equal
deleted
inserted
replaced
22426:3a0c7ecabd79 | 22427:58cdc5d7f143 |
---|---|
405 | 405 |
406 let &shellslash = orig_shellslash | 406 let &shellslash = orig_shellslash |
407 set completeslash= | 407 set completeslash= |
408 endfunc | 408 endfunc |
409 | 409 |
410 func Test_pum_stopped_by_timer() | |
411 CheckScreendump | |
412 | |
413 let lines =<< trim END | |
414 call setline(1, ['hello', 'hullo', 'heeee', '']) | |
415 func StartCompl() | |
416 call timer_start(100, { -> execute('stopinsert') }) | |
417 call feedkeys("Gah\<C-N>") | |
418 endfunc | |
419 END | |
420 | |
421 call writefile(lines, 'Xpumscript') | |
422 let buf = RunVimInTerminal('-S Xpumscript', #{rows: 12}) | |
423 call term_sendkeys(buf, ":call StartCompl()\<CR>") | |
424 call TermWait(buf, 200) | |
425 call term_sendkeys(buf, "k") | |
426 call VerifyScreenDump(buf, 'Test_pum_stopped_by_timer', {}) | |
427 | |
428 call StopVimInTerminal(buf) | |
429 call delete('Xpumscript') | |
430 endfunc | |
431 | |
410 func Test_pum_with_folds_two_tabs() | 432 func Test_pum_with_folds_two_tabs() |
411 CheckScreendump | 433 CheckScreendump |
412 | 434 |
413 let lines =<< trim END | 435 let lines =<< trim END |
414 set fdm=marker | 436 set fdm=marker |