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:
Justin M. Keyes
2019-03-09 23:12:33 +01:00
committed by GitHub
parent 6eca56c6c5
commit 3cb89cafe3
10 changed files with 177 additions and 38 deletions

View File

@@ -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 |