[patch] Wrong value of window's top line

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[patch] Wrong value of window's top line

Lech Lorens
If two windows show the same buffer, you edit the buffer in one of them
in such a way that a fold is created in the other one that starts above
the window's top line and includes the top line, it will be possible
to scroll the other window in undesirable ways (e.g. it will be possible
to put the cursor outside the file or more folds will be shown than there
actually are).

The problem can be reproduced by e.g. performing the following:

set number
normal isome text
normal yy10gp
vert split
wincmd l
setl fdm=marker fmr={{{,}}} fdc=5
wincmd h
normal gg
normal O{{{1
redraw
normal 50%
normal o{{{1
redraw

Note that the next commands have to be performed "by hand":
wincmd l
normal  

Three closed folds are now visible, while in fact only two of them
exist.

The attached patch fixes the problem.

--
Cheers,
Lech

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---


wrong-top-line.patch (254 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [patch] Wrong value of window's top line

Lech Lorens

On 02-Nov-2009 Lech Lorens <[hidden email]> wrote:
[...]

In case you are unable to reproduce the problem, it can be seen in the
following screen shot:
http://llorens.visualserver.org/wrong-top-line/top-line-wrong.png

The in-fact-nonexistent fold is the middle one in the window on the
right. After Vim's behaviour has been corrected, the screen shot looks
as follows:

http://llorens.visualserver.org/wrong-top-line/top-line-ok.png

--
Cheers,
Lech

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---