diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2023-11-29 21:52:58 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2023-11-29 21:52:58 +0000 |
commit | 931bffbda3668ddc609fc1da8f9eb576b170aa52 (patch) | |
tree | d8c1843a95da5ea0bb4acc09f7e37843d9995c86 /test/functional/editor/jump_spec.lua | |
parent | 142d9041391780ac15b89886a54015fdc5c73995 (diff) | |
parent | 4a8bf24ac690004aedf5540fa440e788459e5e34 (diff) | |
download | rneovim-userreg.tar.gz rneovim-userreg.tar.bz2 rneovim-userreg.zip |
Merge remote-tracking branch 'upstream/master' into userreguserreg
Diffstat (limited to 'test/functional/editor/jump_spec.lua')
-rw-r--r-- | test/functional/editor/jump_spec.lua | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/test/functional/editor/jump_spec.lua b/test/functional/editor/jump_spec.lua index 63f522fe6e..dc056cb252 100644 --- a/test/functional/editor/jump_spec.lua +++ b/test/functional/editor/jump_spec.lua @@ -48,6 +48,48 @@ describe('jumplist', function() feed('<C-O>') eq(buf1, funcs.bufnr('%')) end) + + it('<C-O> scrolls cursor halfway when switching buffer #25763', function() + write_file(fname1, ('foobar\n'):rep(100)) + write_file(fname2, 'baz') + + local screen = Screen.new(5, 25) + screen:attach() + command('set number') + command('edit '..fname1) + feed('35gg') + command('edit '..fname2) + feed('<C-O>') + screen:expect{grid=[[ + {1: 24 }foobar | + {1: 25 }foobar | + {1: 26 }foobar | + {1: 27 }foobar | + {1: 28 }foobar | + {1: 29 }foobar | + {1: 30 }foobar | + {1: 31 }foobar | + {1: 32 }foobar | + {1: 33 }foobar | + {1: 34 }foobar | + {1: 35 }^foobar | + {1: 36 }foobar | + {1: 37 }foobar | + {1: 38 }foobar | + {1: 39 }foobar | + {1: 40 }foobar | + {1: 41 }foobar | + {1: 42 }foobar | + {1: 43 }foobar | + {1: 44 }foobar | + {1: 45 }foobar | + {1: 46 }foobar | + {1: 47 }foobar | + | + ]], attr_ids={ + [1] = {foreground = Screen.colors.Brown}; + }} + end) end) describe("jumpoptions=stack behaves like 'tagstack'", function() |