aboutsummaryrefslogtreecommitdiff
path: root/test/functional/terminal/mouse_spec.lua
diff options
context:
space:
mode:
authorScott Prager <splinterofchaos@gmail.com>2015-04-05 13:20:08 -0400
committerScott Prager <splinterofchaos@gmail.com>2015-04-05 13:40:21 -0400
commitb8ae09b3cf990c9a374a46c644abe0191e09f2f8 (patch)
tree2caba7bd636fa1c62984a4565c7c09a26b8d9b7c /test/functional/terminal/mouse_spec.lua
parentb6296f4e84217adaa3326c715d4e2c82a105bc39 (diff)
downloadrneovim-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/mouse_spec.lua')
-rw-r--r--test/functional/terminal/mouse_spec.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/functional/terminal/mouse_spec.lua b/test/functional/terminal/mouse_spec.lua
index b8f6214f8f..4def4dd7f8 100644
--- a/test/functional/terminal/mouse_spec.lua
+++ b/test/functional/terminal/mouse_spec.lua
@@ -50,6 +50,20 @@ describe('terminal mouse', function()
]])
end)
+ it('will exit focus after <C-\\>, then scrolled', function()
+ feed('<C-\\>')
+ feed('<MouseDown><0,0>')
+ screen:expect([[
+ line23 |
+ line24 |
+ line25 |
+ line26 |
+ line27 |
+ ^line28 |
+ |
+ ]])
+ end)
+
describe('with mouse events enabled by the program', function()
before_each(function()
thelpers.enable_mouse()