Hirohito Higashi wrote:

> 2016-10-15(Sat) 3:41:58 UTC+9 Bram Moolenaar:
> > Ozaki Kiichi wrote:
> > 
> > > 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
> > 
> > Can you please add a test that fails without the patch?
> 
> Here is a test patch.
> I confirmed pass the test with Kiichi's patch, and fails without it.

Thanks!

-- 
BRIDGEKEEPER: What is your favorite editor?
GAWAIN:       Emacs ...  No, Viiiiiiiiiiimmmmmmm!
           "Monty Python and the Holy editor wars" PYTHON (MONTY) SOFTWARE LTD

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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