fix(mark): properly init mark views

(cherry picked from commit 51d4ea17b7)
This commit is contained in:
zeertzjq
2023-04-10 22:00:38 +08:00
committed by github-actions[bot]
parent 2658511d77
commit 7b64dcb30e
4 changed files with 48 additions and 2 deletions

View File

@@ -417,4 +417,48 @@ describe('named marks view', function()
|
]])
end)
it('fallback to standard behavior when mark is loaded from shada', function()
local screen = Screen.new(10, 6)
screen:attach()
command('edit ' .. file1)
feed('G')
feed('mA')
screen:expect([[
26 line |
27 line |
28 line |
29 line |
^30 line |
|
]])
command('set shadafile=Xtestfile-functional-editor-marks-shada')
finally(function()
command('set shadafile=NONE')
os.remove('Xtestfile-functional-editor-marks-shada')
end)
command('wshada!')
command('bwipe!')
screen:expect([[
^ |
~ |
~ |
~ |
~ |
|
]])
command('rshada!')
command('edit ' .. file1)
feed('`"')
screen:expect([[
26 line |
27 line |
28 line |
29 line |
^30 line |
|
]])
feed('`A')
screen:expect_unchanged()
end)
end)