aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/fold_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-10-02 16:32:33 +0800
committerGitHub <noreply@github.com>2022-10-02 16:32:33 +0800
commit0643645d5c9e34f7c385925b98bbcf8f64260385 (patch)
tree35554aa042ceb9564aa2370e5a7e569c5064f5d0 /test/functional/ui/fold_spec.lua
parentdd1c613d0b47e818b7a6657f3c4bdeb959199628 (diff)
downloadrneovim-0643645d5c9e34f7c385925b98bbcf8f64260385.tar.gz
rneovim-0643645d5c9e34f7c385925b98bbcf8f64260385.tar.bz2
rneovim-0643645d5c9e34f7c385925b98bbcf8f64260385.zip
fix(folds): fix fold marker multibyte comparison (#20439)
Diffstat (limited to 'test/functional/ui/fold_spec.lua')
-rw-r--r--test/functional/ui/fold_spec.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/functional/ui/fold_spec.lua b/test/functional/ui/fold_spec.lua
index 6bb8bb81c6..3c143d87ca 100644
--- a/test/functional/ui/fold_spec.lua
+++ b/test/functional/ui/fold_spec.lua
@@ -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)