From b8ae09b3cf990c9a374a46c644abe0191e09f2f8 Mon Sep 17 00:00:00 2001 From: Scott Prager Date: Sun, 5 Apr 2015 13:20:08 -0400 Subject: term: after , resume normal input loop Pressing 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 and only call terminal_send_key() if the next input is a key press. --- test/functional/terminal/mouse_spec.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test/functional/terminal/mouse_spec.lua') 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 , then scrolled', function() + feed('') + feed('<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() -- cgit