mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 07:16:09 +00:00
fix(folds): fix fold marker multibyte comparison
(cherry picked from commit 98ef374f10
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
d367ed9b23
commit
4db8c25bda
@@ -4,6 +4,7 @@ local clear, feed, eq = helpers.clear, helpers.feed, helpers.eq
|
||||
local command = helpers.command
|
||||
local feed_command = helpers.feed_command
|
||||
local insert = helpers.insert
|
||||
local expect = helpers.expect
|
||||
local funcs = helpers.funcs
|
||||
local meths = helpers.meths
|
||||
local source = helpers.source
|
||||
@@ -1911,4 +1912,19 @@ describe("folded lines", function()
|
||||
command('%delete')
|
||||
eq(0, funcs.foldlevel(1))
|
||||
end)
|
||||
|
||||
it('multibyte fold markers work #20438', function()
|
||||
meths.win_set_option(0, 'foldmethod', 'marker')
|
||||
meths.win_set_option(0, 'foldmarker', '«,»')
|
||||
insert([[
|
||||
bbbbb
|
||||
bbbbb
|
||||
bbbbb]])
|
||||
feed('zfgg')
|
||||
expect([[
|
||||
bbbbb/*«*/
|
||||
bbbbb
|
||||
bbbbb/*»*/]])
|
||||
eq(1, funcs.foldlevel(1))
|
||||
end)
|
||||
end)
|
||||
|
Reference in New Issue
Block a user