Hi.

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).
" 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).


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


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

Raspunde prin e-mail lui