diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-12-14 23:45:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-14 23:45:31 +0800 |
commit | 6631df9107ff0d778ca03731867c477c8591f1fc (patch) | |
tree | 0c4dfa4ec5ae2364b30570130d0ed9673df9e85c /test/functional/terminal/mouse_spec.lua | |
parent | d127c684faa9a112575798a81c87babb1c83a7ea (diff) | |
download | rneovim-6631df9107ff0d778ca03731867c477c8591f1fc.tar.gz rneovim-6631df9107ff0d778ca03731867c477c8591f1fc.tar.bz2 rneovim-6631df9107ff0d778ca03731867c477c8591f1fc.zip |
fix(terminal): fix 'mousescroll' not respected in terminal mode (#21415)
Diffstat (limited to 'test/functional/terminal/mouse_spec.lua')
-rw-r--r-- | test/functional/terminal/mouse_spec.lua | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/test/functional/terminal/mouse_spec.lua b/test/functional/terminal/mouse_spec.lua index 899df0ac54..50c8f5e7df 100644 --- a/test/functional/terminal/mouse_spec.lua +++ b/test/functional/terminal/mouse_spec.lua @@ -289,7 +289,7 @@ describe(':terminal mouse', function() ]]) end) - it('wont lose focus if another window is scrolled', function() + it("won't lose focus if another window is scrolled", function() feed('<ScrollWheelUp><4,0><ScrollWheelUp><4,0>') screen:expect([[ {7: 21 }line │line30 | @@ -312,6 +312,34 @@ describe(':terminal mouse', function() ]]) end) + it("scrolling another window respects 'mousescroll'", function() + command('set mousescroll=ver:1') + feed('<ScrollWheelUp><4,0>') + screen:expect([[ + {7: 26 }line │line30 | + {7: 27 }line │rows: 5, cols: 25 | + {7: 28 }line │rows: 5, cols: 24 | + {7: 29 }line │mouse enabled | + {7: 30 }line │{1: } | + ========== ========== | + {3:-- TERMINAL --} | + ]]) + command('set mousescroll=ver:10') + feed('<ScrollWheelUp><4,0>') + screen:expect([[ + {7: 16 }line │line30 | + {7: 17 }line │rows: 5, cols: 25 | + {7: 18 }line │rows: 5, cols: 24 | + {7: 19 }line │mouse enabled | + {7: 20 }line │{1: } | + ========== ========== | + {3:-- TERMINAL --} | + ]]) + command('set mousescroll=ver:0') + feed('<ScrollWheelUp><4,0>') + screen:expect_unchanged() + end) + it('will lose focus if another window is clicked', function() feed('<LeftMouse><5,1>') screen:expect([[ |