Ozaki Kiichi wrote:
> There are two issues:
>
> 1) Incorrect highlighting (with ':set incsearch')
>
> 2) Count is ignored
>
>
> [repro steps]
>
> - test.txt (5 lines)
>
> ```
> {cursor}
>
> 1: pattern12345
>
> 2: pattern12345
> ```
>
> vim -N -u NONE test.txt
>
> :set incsearch
>
> "" issue 1
>
> :1
>
> 2/pattern/e
>
> " Although highlighting is on second 'pattern' line while input '2/pattern/'
> (correct),
> " you input last 'e' and highlighting goes on first 'pattern' line
> (incorrect).
I can reproduce this.
> " Then, you input return key, cursor goes on second 'pattern' line (correct).
>
> "" issue 2
>
> :1
>
> 2/pattern/e3
>
> " It is same as issue 1 until input last '3'.
> " Then, you input return key, cursor goes on first 'pattern' line (incorrect).
I cannot reproduce this, it goes to 3 characters after the second match,
as expected.
> [amendment]
>
> I propose a below patch.
>
> https://gist.github.com/ichizok/9252b826f789f8addd98
>
> * search.c: L571~
>
> 'extra_col' is to 0 if with positive end-offset larger than cursor-offset,
> but I suppose it should be changed depending the search-starting position
> after a first match.
>
> * search.c: L679~
>
> The condition "endpos.col - 1 < start_pos.col + extra_col" is checked if with
> end-offset,
> but it is always false after a first match, thus search-starting position
> doesn't progress.
> I suppose it should be checked only in a first match.
--
FIRST HEAD: Oh! quick! get the sword out I want to cut his head off.
THIRD HEAD: Oh, cut your own head off.
SECOND HEAD: Yes - do us all a favour.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// 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.