Hi Christian,

On Wed, Aug 3, 2016 at 3:58 PM, Yegappan Lakshmanan <yegapp...@gmail.com> wrote:
>>> >> >
>>> >> >> I think it should.  Most users will have 'wrapscan' on, since it is 
>>> >> >> the
>>> >> >> default.  If someone switches it off he must have a reason for it.
>>> >> >
>>> >> > okay, fixed with the latest version
>>> >> >
>>> >>
>>> >> I tested the latest patch and the confirmed that the problems I reported 
>>> >> earlier
>>> >> are fixed. I saw some new issues. Take the following text:
>>> >>
>>> >>   1
>>> >>   2 these
>>> >>   3 the
>>> >>   4 their
>>> >>   5 there
>>> >>   6 their
>>> >>   7 the
>>> >>   8 them
>>> >>   9 these
>>> >>
>>> >> The cursor is in line 1 and I have 'nowrapscan' set. I search for "the" 
>>> >> and
>>> >> press CTRL-N 7 times and "the" in "these" is highlighted. Now I press
>>> >> CTRL-L to copy "s" and then erase it. Now if I press CTRL-P, I expect
>>> >> that the cursor will move to line 8. Instead the cursor moves to line 7.
>>> >>
>>> >> Another problem: Place the cursor in line 1. Enter "/thes" and then press
>>> >> CTRL-N. The "thes" in line 9 is highlighted. Now if you press backspace,
>>> >> the cursor jumps back to line 3. I expected that the cursor will remain
>>> >> in line 9.
>>> >
>>> > Thanks, will look at these and add some tests.
>>> >
>>> >> I think, the CTRL-N and CTRL-P should respect the search direction.
>>> >> For example, if I search a pattern using "?text", pressing CTRL-N
>>> >> should search backwards. Currently CTRL-N always searches
>>> >> forward (irrespective of the search direction). Note that this is
>>> >> different from how "n" and "N" work.
>>> >
>>> > Please don't make me do this. Currently the inconsistent search
>>> > direction is one of my biggest annoyances of Vim. I really really really
>>> > hate it, that I can't rely on the fact that N searches backwards and n
>>> > forward.
>>> >
>>>
>>> I don't have any preference between the two options. I was just pointing
>>> out the deviation from the behavior of 'n' and 'N' commands.
>>
>> I attach an updated patch, which fixes all issues mentioned so far.
>> Additionally I added a test for this.
>>
>
> I can confirm that this patch fixes all the issues reported so far.
> I played around with CTRL-N and CTRL-P at the search prompt
> for some time and didn't find any issues.
>

I found a problem with searching for a pattern in a single line if
the pattern appears more than once in the line. Example:

some text some text

In the above line with the cursor at the beginning of the line,
search for "text", press <C-N> and then press <C-P>.
The expected behavior is for the cursor to be placed at the
first "text". But the cursor is not moved and is still placed
at the second "text".

If the pattern appears in a different line, then the problem is
not seen. Example:

some text
some text

- Yegappan

>
>>
>> I will be away the next 2-3 weeks, so won't have time to work on this
>> further. However, I'd appreciate feedback and will work further on it
>> after I return, if there are more issues.
>>
>> Oh and before I forget to mention it. I made Ctrl-N always go further
>> down and Ctrl-P always go further up and I don't intend to change that.
>>

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