diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-07-30 22:07:58 +0200 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2022-08-02 13:54:41 +0200 |
commit | 9092540315bef8a685a06825073d05c394bf6575 (patch) | |
tree | f3c6ad62ae0ad2133818949a06cbd39269129190 /test/functional/terminal/buffer_spec.lua | |
parent | 0a049c322fda5f2bb124429086c2713ff99c7142 (diff) | |
download | rneovim-9092540315bef8a685a06825073d05c394bf6575.tar.gz rneovim-9092540315bef8a685a06825073d05c394bf6575.tar.bz2 rneovim-9092540315bef8a685a06825073d05c394bf6575.zip |
feat(terminal): implement <c-\><c-o> for terminal mode
this works similar to <c-o> or <c-\><c-o> in insert mode
Diffstat (limited to 'test/functional/terminal/buffer_spec.lua')
-rw-r--r-- | test/functional/terminal/buffer_spec.lua | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/test/functional/terminal/buffer_spec.lua b/test/functional/terminal/buffer_spec.lua index ec3066c20d..23430a620b 100644 --- a/test/functional/terminal/buffer_spec.lua +++ b/test/functional/terminal/buffer_spec.lua @@ -13,6 +13,7 @@ local exc_exec = helpers.exc_exec local matches = helpers.matches local exec_lua = helpers.exec_lua local sleep = helpers.sleep +local funcs = helpers.funcs describe(':terminal buffer', function() local screen @@ -300,6 +301,44 @@ describe(':terminal buffer', function() feed_command('put a') -- register a is empty helpers.assert_alive() end) + + it([[can use temporary normal mode <c-\><c-o>]], function() + eq('t', funcs.mode(1)) + feed [[<c-\><c-o>]] + screen:expect{grid=[[ + tty ready | + {2:^ } | + | + | + | + | + {3:-- (terminal) --} | + ]]} + eq('ntT', funcs.mode(1)) + + feed [[:let g:x = 17]] + screen:expect{grid=[[ + tty ready | + {2: } | + | + | + | + | + :let g:x = 17^ | + ]]} + + feed [[<cr>]] + screen:expect{grid=[[ + tty ready | + {1: } | + | + | + | + | + {3:-- TERMINAL --} | + ]]} + eq('t', funcs.mode(1)) + end) end) describe('No heap-buffer-overflow when using', function() |