mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
fix(folds): fix fold regression with :move (#18685)
This commit is contained in:
@@ -1757,6 +1757,67 @@ describe("folded lines", function()
|
||||
end
|
||||
assert_alive()
|
||||
end)
|
||||
|
||||
it('work correctly with :move #18668', function()
|
||||
screen:try_resize(45, 12)
|
||||
source([[
|
||||
set foldmethod=expr foldexpr=indent(v:lnum)
|
||||
let content = ['', '', 'Line1', ' Line2', ' Line3',
|
||||
\ 'Line4', ' Line5', ' Line6',
|
||||
\ 'Line7', ' Line8', ' Line9']
|
||||
call append(0, content)
|
||||
normal! zM
|
||||
call cursor(4, 1)
|
||||
move 2
|
||||
move 1
|
||||
]])
|
||||
if multigrid then
|
||||
screen:expect([[
|
||||
## grid 1
|
||||
[2:---------------------------------------------]|
|
||||
[2:---------------------------------------------]|
|
||||
[2:---------------------------------------------]|
|
||||
[2:---------------------------------------------]|
|
||||
[2:---------------------------------------------]|
|
||||
[2:---------------------------------------------]|
|
||||
[2:---------------------------------------------]|
|
||||
[2:---------------------------------------------]|
|
||||
[2:---------------------------------------------]|
|
||||
[2:---------------------------------------------]|
|
||||
[2:---------------------------------------------]|
|
||||
[3:---------------------------------------------]|
|
||||
## grid 2
|
||||
|
|
||||
{5:^+-- 2 lines: Line2··························}|
|
||||
|
|
||||
Line1 |
|
||||
Line4 |
|
||||
{5:+-- 2 lines: Line5··························}|
|
||||
Line7 |
|
||||
{5:+-- 2 lines: Line8··························}|
|
||||
|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
## grid 3
|
||||
|
|
||||
]])
|
||||
else
|
||||
screen:expect([[
|
||||
|
|
||||
{5:^+-- 2 lines: Line2··························}|
|
||||
|
|
||||
Line1 |
|
||||
Line4 |
|
||||
{5:+-- 2 lines: Line5··························}|
|
||||
Line7 |
|
||||
{5:+-- 2 lines: Line8··························}|
|
||||
|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
|
|
||||
]])
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
describe("with ext_multigrid", function()
|
||||
|
||||
Reference in New Issue
Block a user