mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 03:15:39 +00:00
vim-patch:8.1.0994: fix relative cursor position #9676
Problem: Relative cursor position is not calculated correctly.
Solution: Always set topline, also when window is one line only.
(Robert Webb) Add more info to getwininfo() for testing.
8fcb60f961
This commit is contained in:
@@ -649,13 +649,14 @@ describe('ui/mouse/input', function()
|
||||
mouse scrolling
|
||||
]])
|
||||
screen:try_resize(53, 14)
|
||||
feed('k')
|
||||
feed_command('sp', 'vsp')
|
||||
screen:expect([[
|
||||
lines {4:│}lines |
|
||||
to {4:│}to |
|
||||
test {4:│}test |
|
||||
mouse scrolling {4:│}mouse scrolling |
|
||||
^ {4:│} |
|
||||
^mouse scrolling {4:│}mouse scrolling |
|
||||
{4:│} |
|
||||
{0:~ }{4:│}{0:~ }|
|
||||
{5:[No Name] [+] }{4:[No Name] [+] }|
|
||||
to |
|
||||
@@ -672,8 +673,8 @@ describe('ui/mouse/input', function()
|
||||
feed('<ScrollWheelDown><0,0>')
|
||||
end
|
||||
screen:expect([[
|
||||
mouse scrolling {4:│}lines |
|
||||
^ {4:│}to |
|
||||
^mouse scrolling {4:│}lines |
|
||||
{4:│}to |
|
||||
{0:~ }{4:│}test |
|
||||
{0:~ }{4:│}mouse scrolling |
|
||||
{0:~ }{4:│} |
|
||||
@@ -693,8 +694,8 @@ describe('ui/mouse/input', function()
|
||||
feed('<ScrollWheelUp><27,0>')
|
||||
end
|
||||
screen:expect([[
|
||||
mouse scrolling {4:│}text |
|
||||
^ {4:│}with |
|
||||
^mouse scrolling {4:│}text |
|
||||
{4:│}with |
|
||||
{0:~ }{4:│}many |
|
||||
{0:~ }{4:│}lines |
|
||||
{0:~ }{4:│}to |
|
||||
@@ -715,8 +716,8 @@ describe('ui/mouse/input', function()
|
||||
feed('<ScrollWheelUp><27,7><ScrollWheelUp>')
|
||||
end
|
||||
screen:expect([[
|
||||
mouse scrolling {4:│}text |
|
||||
^ {4:│}with |
|
||||
^mouse scrolling {4:│}text |
|
||||
{4:│}with |
|
||||
{0:~ }{4:│}many |
|
||||
{0:~ }{4:│}lines |
|
||||
{0:~ }{4:│}to |
|
||||
|
||||
Reference in New Issue
Block a user