Ozaki Kiichi wrote:

> A part of highlight by matchaddpos() remains after calling matchdelete().
> 
> Example:
> 
> matchtest.vim
> -----------------------
> function! Test()
>     call setline(1, "test")
>     call setline(2, "test")
>     let g:m = matchaddpos("ErrorMsg", [ [1, 1], [2 ,2] ])
>     return g:m
> endfunction
> 
> function! Del()
>     call matchdelete(g:m)
>     " getmatches() is empty.
>     echo getmatches() == []
>     " => 1
> endfunction
> -----------------------
> 
> vim -u NONE -N
> :so matchtest.vim
> :call Test()
> :call Del()
> 
> Highlight at 2nd line ( [2, 2] ) remains.
> 
> It seems that match_add() set 'b_mod_bot' one fewer than correct value.
> 
> https://gist.github.com/ichizok/ba8c2c667f2fba07b09d

Thanks for the patch, I'll check it out.

-- 
Overflow on /dev/null, please empty the bit bucket.

 /// Bram Moolenaar -- [email protected] -- 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui