diff options
author | Scott Prager <splinterofchaos@gmail.com> | 2015-04-05 13:20:08 -0400 |
---|---|---|
committer | Scott Prager <splinterofchaos@gmail.com> | 2015-04-05 13:40:21 -0400 |
commit | b8ae09b3cf990c9a374a46c644abe0191e09f2f8 (patch) | |
tree | 2caba7bd636fa1c62984a4565c7c09a26b8d9b7c /test/functional/terminal/buffer_spec.lua | |
parent | b6296f4e84217adaa3326c715d4e2c82a105bc39 (diff) | |
download | rneovim-b8ae09b3cf990c9a374a46c644abe0191e09f2f8.tar.gz rneovim-b8ae09b3cf990c9a374a46c644abe0191e09f2f8.tar.bz2 rneovim-b8ae09b3cf990c9a374a46c644abe0191e09f2f8.zip |
term: after <C-\>, resume normal input loop
Pressing <C-\> and then a mouse click will insert the click into the
terminal as if a keyboard button had been pressed.
Keep track of whether the last input was <C-\> and only call
terminal_send_key() if the next input is a key press.
Diffstat (limited to 'test/functional/terminal/buffer_spec.lua')
-rw-r--r-- | test/functional/terminal/buffer_spec.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/functional/terminal/buffer_spec.lua b/test/functional/terminal/buffer_spec.lua index 0756508a4c..ffdfec4428 100644 --- a/test/functional/terminal/buffer_spec.lua +++ b/test/functional/terminal/buffer_spec.lua @@ -170,15 +170,18 @@ describe('terminal buffer', function() source([[ function! SplitWindow() new + call feedkeys("iabc\<Esc>") endfunction startinsert call jobstart(['sh', '-c', 'exit'], {'on_exit': function("SplitWindow")}) + call feedkeys("\<C-\>", 't') " vim will expect <C-n>, but be exited out of + " the terminal before it can be entered. ]]) -- We should be in a new buffer now. screen:expect([[ - ^ | + ab^c | ~ | ========== | rows: 2, cols: 50 | @@ -188,7 +191,7 @@ describe('terminal buffer', function() ]]) neq(tbuf, eval('bufnr("%")')) - execute('quit') -- Should exit the new window, not the terminal. + execute('quit!') -- Should exit the new window, not the terminal. eq(tbuf, eval('bufnr("%")')) execute('set laststatus=1') -- Restore laststatus to the default. |