aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/mouse_spec.lua
diff options
context:
space:
mode:
authorbambu <bambu@revengsec.com>2015-10-12 20:27:17 -0400
committerJustin M. Keyes <justinkz@gmail.com>2016-04-25 01:31:44 -0400
commit5a5ef1c2227f1cb1c599cc8224a48c3e831aca9b (patch)
tree0f1a57e5fcd7d132d4f4606f317647f8dcc2e79f /test/functional/ui/mouse_spec.lua
parentdfe85dd80afe1026608faa222c23f1f84ef01135 (diff)
downloadrneovim-5a5ef1c2227f1cb1c599cc8224a48c3e831aca9b.tar.gz
rneovim-5a5ef1c2227f1cb1c599cc8224a48c3e831aca9b.tar.bz2
rneovim-5a5ef1c2227f1cb1c599cc8224a48c3e831aca9b.zip
mouse: Implement horizontal scroll. #3450
- Code from Vim source. - Removed the check for 'guioptions' - mouse_spec.lua: test <ScrollWheelLeft> and <ScrollWheelRight> - Move horizontal scroll logic to mouse.c - Remove 'gui_' from the function names - Renamed variables to be more specific (as opposed to generic p, w). - Marked some functions as `static`
Diffstat (limited to 'test/functional/ui/mouse_spec.lua')
-rw-r--r--test/functional/ui/mouse_spec.lua31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/functional/ui/mouse_spec.lua b/test/functional/ui/mouse_spec.lua
index da9d6a0cd2..d0d791308b 100644
--- a/test/functional/ui/mouse_spec.lua
+++ b/test/functional/ui/mouse_spec.lua
@@ -426,4 +426,35 @@ describe('Mouse input', function()
|
]])
end)
+
+ it('horizontal scrolling', function()
+ feed("<esc>:set nowrap<cr>")
+
+ feed("a <esc>20Ab<esc>")
+ screen:expect([[
+ |
+ |
+ bbbbbbbbbbbbbbb^b |
+ ~ |
+ |
+ ]])
+
+ feed("<ScrollWheelLeft><0,0>")
+ screen:expect([[
+ |
+ |
+ n bbbbbbbbbbbbbbbbbbb^b |
+ ~ |
+ |
+ ]])
+
+ feed("^<ScrollWheelRight><0,0>")
+ screen:expect([[
+ g |
+ |
+ ^t and selection bbbbbbbbb|
+ ~ |
+ |
+ ]])
+ end)
end)