aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Hinz <mh.codebro@gmail.com>2015-04-13 02:06:31 +0200
committerMarco Hinz <mh.codebro@gmail.com>2015-04-28 14:16:37 +0200
commit6449921943fa5fbcbd4e26039da1bbeaa96c6c0d (patch)
tree8eb82dba029b14f96aef190b2fd06a771f459cc1
parentc1d1992b1c968facd81f304c2411445257cf01ce (diff)
downloadrneovim-6449921943fa5fbcbd4e26039da1bbeaa96c6c0d.tar.gz
rneovim-6449921943fa5fbcbd4e26039da1bbeaa96c6c0d.tar.bz2
rneovim-6449921943fa5fbcbd4e26039da1bbeaa96c6c0d.zip
UI test: left click in tabline
-rw-r--r--test/functional/ui/mouse_spec.lua27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/functional/ui/mouse_spec.lua b/test/functional/ui/mouse_spec.lua
index f1973f60ba..52078f0b7d 100644
--- a/test/functional/ui/mouse_spec.lua
+++ b/test/functional/ui/mouse_spec.lua
@@ -57,6 +57,33 @@ describe('Mouse input', function()
]])
end)
+ it('left click in tabline switches to tab', function()
+ local tab_attrs = {
+ tab = { background=Screen.colors.LightGrey, underline=true },
+ sel = { bold=true },
+ fill = { reverse = true }
+ }
+ execute('%delete')
+ insert('this is foo')
+ execute('silent file foo | tabnew | file bar')
+ insert('this is bar')
+ screen:expect([[
+ {tab: + foo }{sel: + bar }{fill: }{tab:X}|
+ this is ba^r |
+ ~ |
+ ~ |
+ |
+ ]], tab_attrs)
+ feed('<LeftMouse><4,0>')
+ screen:expect([[
+ {sel: + foo }{tab: + bar }{fill: }{tab:X}|
+ this is fo^o |
+ ~ |
+ ~ |
+ |
+ ]], tab_attrs)
+ end)
+
it('left drag changes visual selection', function()
-- drag events must be preceded by a click
feed('<LeftMouse><2,1>')