diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2020-12-23 17:13:13 +0100 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2021-01-01 15:47:44 +0100 |
commit | 6db86cb2d3d4ca152f156dc07362f8796150fae0 (patch) | |
tree | f87a1c0a009f4b0d054e53954db41ddeb25b991f /test/functional/ui/mouse_spec.lua | |
parent | d0668b36a3e2d0683059baead45bea27e2358e9c (diff) | |
download | rneovim-6db86cb2d3d4ca152f156dc07362f8796150fae0.tar.gz rneovim-6db86cb2d3d4ca152f156dc07362f8796150fae0.tar.bz2 rneovim-6db86cb2d3d4ca152f156dc07362f8796150fae0.zip |
ui: make 'mouse' handling in external UI more consistent
before the behaviour of 'mouse' was inconsistent in external UI,
as some remapping logic would check has_mouse() and others don't
(no difference in TUI or vim classic). With this change, the behaviour
is consistently up to the UI decide (see ui.txt edit)
Behaviour of tui.c is unaffected by this change.
Diffstat (limited to 'test/functional/ui/mouse_spec.lua')
-rw-r--r-- | test/functional/ui/mouse_spec.lua | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/test/functional/ui/mouse_spec.lua b/test/functional/ui/mouse_spec.lua index a741136111..7bca741ae3 100644 --- a/test/functional/ui/mouse_spec.lua +++ b/test/functional/ui/mouse_spec.lua @@ -45,13 +45,33 @@ describe('ui/mouse/input', function() it('single left click moves cursor', function() feed('<LeftMouse><2,1>') - screen:expect([[ + screen:expect{grid=[[ testing | mo^use | support and selection | {0:~ }| | + ]], mouse_enabled=true} + feed('<LeftMouse><0,0>') + screen:expect([[ + ^testing | + mouse | + support and selection | + {0:~ }| + | ]]) + end) + + it("in external ui works with unset 'mouse'", function() + meths.set_option('mouse', '') + feed('<LeftMouse><2,1>') + screen:expect{grid=[[ + testing | + mo^use | + support and selection | + {0:~ }| + | + ]], mouse_enabled=false} feed('<LeftMouse><0,0>') screen:expect([[ ^testing | |