Saturday, May 22, 2021

Re: Bug/inconsistency in /\%'/ in linewise-vs-characterwise?

On 2021-05-23 00:25, Bram Moolenaar wrote:
> Tim Chase wrote:
>> /\%'<\_.\{-}\%'>/
>>
>> So then I highlighted some text in *linewise* visual mode ("V")
>> and hit <esc> and the highlight was removed. Using "n" to search
>> for the next match gave me an
>>
>> E486: Pattern not found: \%'<\_.\{-}\%'>
>
> I guess the problem is that the '> mark is at "MAXCOL". That means
> "at the end of the line". But that position doesn't actually
> exist, so searching for "\%'>" fails.
>
> It probably works better when \%'> matches just beyond the last
> character of the line, like /\n does. You can create an issue for
> that.

That makes sense. Done:

https://github.com/vim/vim/issues/8238

(linking here just in case anybody else stumbles on this thread and
wants to follow along)

Thanks for looking into it.

-tim




--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20210522175820.5bf7f140%40bigbox.attlocal.net.

No comments:

Post a Comment