diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2015-01-15 09:19:27 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2015-01-15 09:19:27 -0300 |
commit | 5f24549ab1ecd69236be2761a2e43690ba7cf283 (patch) | |
tree | 7db3ba6961a7115c43e0133a6780f4a742112f05 /test/functional/ui/mouse_spec.lua | |
parent | 9b4f6fbd33ebd452d472b0333accfcb34e01173b (diff) | |
parent | 14ebe608e2d26ba352f5abe1c32ce18fcc2eca06 (diff) | |
download | rneovim-5f24549ab1ecd69236be2761a2e43690ba7cf283.tar.gz rneovim-5f24549ab1ecd69236be2761a2e43690ba7cf283.tar.bz2 rneovim-5f24549ab1ecd69236be2761a2e43690ba7cf283.zip |
Merge PR #1810 'abstract_ui fixes and improvements(continuation)'
Diffstat (limited to 'test/functional/ui/mouse_spec.lua')
-rw-r--r-- | test/functional/ui/mouse_spec.lua | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/test/functional/ui/mouse_spec.lua b/test/functional/ui/mouse_spec.lua index 507b5aacae..653d8ad92c 100644 --- a/test/functional/ui/mouse_spec.lua +++ b/test/functional/ui/mouse_spec.lua @@ -1,6 +1,7 @@ local helpers = require('test.functional.helpers') local Screen = require('test.functional.ui.screen') local clear, feed, nvim = helpers.clear, helpers.feed, helpers.nvim +local insert, execute = helpers.insert, helpers.execute describe('Mouse input', function() local screen, hlgroup_colors @@ -154,4 +155,87 @@ describe('Mouse input', function() ]]) feed('<cr>') end) + + it('mouse whell will target the hovered window', function() + feed('ggdG') + insert([[ + Inserting + text + with + many + lines + to + test + mouse scrolling + ]]) + screen:try_resize(53, 14) + execute('sp', 'vsp') + screen:expect([[ + lines |lines | + to |to | + test |test | + mouse scrolling |mouse scrolling | + ^ | | + ~ |~ | + [No Name] [+] [No Name] [+] | + to | + test | + mouse scrolling | + | + ~ | + [No Name] [+] | + :vsp | + ]]) + feed('<MouseUp><0,0>') + screen:expect([[ + mouse scrolling |lines | + ^ |to | + ~ |test | + ~ |mouse scrolling | + ~ | | + ~ |~ | + [No Name] [+] [No Name] [+] | + to | + test | + mouse scrolling | + | + ~ | + [No Name] [+] | + | + ]]) + feed('<MouseDown><27,0>') + screen:expect([[ + mouse scrolling |text | + ^ |with | + ~ |many | + ~ |lines | + ~ |to | + ~ |test | + [No Name] [+] [No Name] [+] | + to | + test | + mouse scrolling | + | + ~ | + [No Name] [+] | + | + ]]) + feed('<MouseDown><27,7><MouseDown>') + screen:expect([[ + mouse scrolling |text | + ^ |with | + ~ |many | + ~ |lines | + ~ |to | + ~ |test | + [No Name] [+] [No Name] [+] | + Inserting | + text | + with | + many | + lines | + [No Name] [+] | + | + ]]) + end) end) |