diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2019-06-04 15:23:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-04 15:23:40 +0200 |
commit | 16ee24082f72162d3bdfbddb0b40b5abc2c90fda (patch) | |
tree | cf952d781b666a349ff35213257e23a183209e0b /test/functional/insert/ctrl_o_spec.lua | |
parent | 3adb8a10b157bc5c20ab1bdcbaa6f6aa9e36a5fc (diff) | |
parent | e50aa2a6c65453067ae3554157fdd31ac8af6168 (diff) | |
download | rneovim-16ee24082f72162d3bdfbddb0b40b5abc2c90fda.tar.gz rneovim-16ee24082f72162d3bdfbddb0b40b5abc2c90fda.tar.bz2 rneovim-16ee24082f72162d3bdfbddb0b40b5abc2c90fda.zip |
Merge pull request #10117 from bfredl/ctrl-o_event
normal: Don't exit CTRL-O mode after processing K_EVENT
Diffstat (limited to 'test/functional/insert/ctrl_o_spec.lua')
-rw-r--r-- | test/functional/insert/ctrl_o_spec.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/functional/insert/ctrl_o_spec.lua b/test/functional/insert/ctrl_o_spec.lua index fbdff8a3a0..543d0a7d68 100644 --- a/test/functional/insert/ctrl_o_spec.lua +++ b/test/functional/insert/ctrl_o_spec.lua @@ -5,6 +5,7 @@ local eval = helpers.eval local expect = helpers.expect local feed = helpers.feed local insert = helpers.insert +local meths = helpers.meths describe('insert-mode Ctrl-O', function() before_each(clear) @@ -40,4 +41,14 @@ describe('insert-mode Ctrl-O', function() feed('ooo') expect('hello oooworld') end) + + it("doesn't cancel Ctrl-O mode when processing event", function() + feed('iHello World<c-o>') + eq({mode='niI', blocking=false}, meths.get_mode()) -- fast event + eq(2, eval('1+1')) -- causes K_EVENT key + eq({mode='niI', blocking=false}, meths.get_mode()) -- still in ctrl-o mode + feed('dd') + eq({mode='i', blocking=false}, meths.get_mode()) -- left ctrl-o mode + expect('') -- executed the command + end) end) |