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
-~----------~----~----~----~------~----~------~--~---
diff --git a/src/misc1.c b/src/misc1.c
index 23a1c1e..d64f146 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -2886,6 +2886,8 @@ changed_common(lnum, col, lnume, xtra)
}
#endif
}
+
+ set_topline(wp, wp->w_topline);
}
}