Hi Christian

On 02/09/2016 20:44, Christian Brabandt wrote:
Hi Mike!

On Fr, 02 Sep 2016, Mike Williams wrote:

Hi,

On 02/09/2016 12:22, Christian Brabandt wrote:
On Mi, 31 Aug 2016, Mike Williams wrote:

Hi,

I pretty much lurk here these days but remember seeing some
discussion on changes to do with incremental search.  I am seeing
strange screen jumps with incremental search with the current
version 7.4.2295.  This is on on Windows and linux.

The following will reproduce the issue on Windows.  Start in the VIM
source directory and invoke vim with gvim -u NONE -U NONE
if_cscope.h. Next enable incsearch with ":set incsearch" and then
start a search with "/Sto" - this should cause the display to jump
to an enum near the end of the file.  At this point delete the o to
leave "/St" as the search pattern and then hit return to finish the
search.  I see VIM jumping back to the top of the file but with the
cursor at the same position as for the search.  If then hit j to go
down one line vim jumps back to the end of the file where the
original search succeeded.

The action that seems to trigger the unexpected jumps around the
buffer is deleting characters from the search pattern.  It can be
confusing as the screen doesn't initially display what you are
expecting (with the cursor appearing beyond the end of a line
sometimes) and then any cursor movement cause the display to jump
again.

Thanks for the almost perfect bug report (it just needed a patch to be
perfect ;))

I could easily reproduce it. Turns out, that after backspacing, the view
will not be reset correctly. So we have to save some variables there.

Please check the attached patch, which includes a test to fix this
behaviour.

It does fix my original problem but it has caused a new one.

With the same setup as above, delete all of pattern back to / and then
hit return.  I get the expected "No previous regular expression" error.
Then press return.  VIM should return back to the top of the file but
instead displays the end of the file - until you move the cursor when it
jumps back to the top of the file.  This does not happen without the
patch applied.

good catch. updated patch attached. I added a test, but that didn't work
as expected. Therefore the test is currently disabled. I verified
manually, that either of <c-w> <c-u> <esc> <bs> <c-c> works as expected.

Getting better :) but another failure case I am afraid.

Same setup as before.  This time use the search string /Stora - that
search will fail and VIM will jump back to the start of the file - but
then backspace the a to leave /Stor which is a match once again and VIM
displays it ok.  Then hit return and VIM displays the top of the file
until you move the cursor when the display updates back to the match at
the end.

HTH - TTFN

Mike
--
A leading authority is someone lucky who guessed right.
[Visit us at Labelexpo Americas 2016, stand 5931] 
<http://globalgraphics.com/company/events/labelexpo-americas-2016>

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