diff options
| author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-01-06 19:52:34 -0500 |
|---|---|---|
| committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-01-06 20:30:38 -0500 |
| commit | 5395dd62097109236ff3e6473fb90d9560a6fd94 (patch) | |
| tree | fbf514f0877a49eb53378c6be09e8f45550a275c /src/nvim/testdir | |
| parent | 0c42e0e8b1e24c2f6e2336ca955a1a5f8d3e0c5b (diff) | |
| download | rneovim-5395dd62097109236ff3e6473fb90d9560a6fd94.tar.gz rneovim-5395dd62097109236ff3e6473fb90d9560a6fd94.tar.bz2 rneovim-5395dd62097109236ff3e6473fb90d9560a6fd94.zip | |
vim-patch:8.1.0696: when test_edit fails 'insertmode' may not be reset
Problem: When test_edit fails 'insertmode' may not be reset and the next
test may get stuck. (James McCoy)
Solution: Always reset 'insertmode' after executing a test. Avoid that an
InsertCharPre autocommand or a 'complete' function can change the
state. (closes vim/vim#3768)
https://github.com/vim/vim/commit/8ad16da7290190f55f88073d5586dfe133fddf45
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/runtest.vim | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nvim/testdir/runtest.vim b/src/nvim/testdir/runtest.vim index 4fe7db135b..bfd6240f0c 100644 --- a/src/nvim/testdir/runtest.vim +++ b/src/nvim/testdir/runtest.vim @@ -26,7 +26,7 @@ " It will be called after each Test_ function. " " When debugging a test it can be useful to add messages to v:errors: -" call add(v:errors, "this happened") +" call add(v:errors, "this happened") " Check that the screen size is at least 24 x 80 characters. @@ -130,6 +130,10 @@ func RunTheTest(test) endtry endif + " In case 'insertmode' was set and something went wrong, make sure it is + " reset to avoid trouble with anything else. + set noinsertmode + if exists("*TearDown") try call TearDown() |