Hi.

This is matchaddpos() problem.

[repro steps]

vim -Nu NONE

i1234567890<Esc>
:call matchaddpos('ErrorMsg', [[1, 1, 5], [1, 3, 5]])

expected: colored 1~7 ("12345" and "34567"; pos [1, 1, 5] and [1, 3, 5], 
overlapped "345")

actual: colored 1~5 ("12345"; only first pos [1, 1, 5])

This problem occurs when overlapping more than 1 char.
e.g. [[1, 1, 5], [1, 5, 5]] is no problem.

[cause]

https://github.com/vim/vim/blob/fd89d7e/src/screen.c#L7770-L7771

On processing second pos [1, 3, 5], mincol is 5 (end of first pos col).
Thus, col (== 3) is less then mincol, and second pos is skipped.

I think that the case of "col < mincol < col + len -1" should be also processed.

[patch]

https://gist.github.com/ichizok/f34c9018f5e9e452d3bc78cc9026a720

Thank you.
- Ozaki Kiichi

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui