Describe the bug
Sometimes, the conceal character used in a match installed by matchadd() is displayed too many times.
To Reproduce
Run this shell command:
vim -Nu NONE -S <(cat <<'EOF'
let lines =<< trim END
aaa|bbb|ccc
aaa|bbb|ccc
aaa|bbb|ccc
END
call setline(1, lines)
call matchadd('Conceal', '^..', 10, -1, #{conceal: 'X'})
syn match foobar '^.'
setl cocu=n cole=1
EOF
)
The conceal character X is displayed twice.
Expected behavior
The conceal character X is displayed once.
Environment
Additional context
Regression introduced in 8.0.0672.
I found this issue while trying to conceal the middle column in a location window, when the location list has been set by an :ltag command.
syn on let items = [#{lnum: 1, col: 1, filename: '/tmp/file', text: 'some text'}] call setqflist([], ' ', #{items: items}) copen call matchadd('Conceal', '|.\{-}|', 10, -1, #{conceal: '|'}) setl cocu=n cole=1
This time, the conceal character (|) is displayed 3 times, instead of once.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()