Avoid clearing the screen in most situations. NOT_VALID should be
equivalent to CLEAR unless some external force messed up the terminal,
for these situations <c-l> and :mode will still clear the screen.
Also eliminate some obsolete code in screen.c, that dealt with that in
vim drawing window 1 can mess up window 2, but this never happens in
nvim.
But what about slow terminals? There is two common meanings in which
a terminal is said to be "slow":
Most commonly (and in the sense of vim:s nottyfast) it means low
bandwidth for sending bytes from nvim to the terminal. If the screen is
very similar before and after the update_screen(CLEAR) this change
should reduce bandwidth. If the screen is quite different, but there is
no new regions of contiguous whitespace, clearing doesn't reduce
bandwidth significantly. If the new screen contains a lot of whitespace,
it will depend of if vsplits are used or not: as long as there is no
vsplits, ce is used to cheaply clear the rest of the line, so
full-screen clear is not needed to reduce bandwith. However a left
vsplit currently needs to be padded with whitespace all the way to the
separator. It is possible ec (clear N chars) can be used to reduce
bandwidth here if this is a problem. (All of this assumes that one
doesn't set Normal guibg=... on a non-BCE terminal, if you do you are
doomed regardless of this change).
Slow can also mean that drawing pixels on the screen is slow. E-ink
screens is a recent example. Avoiding clearing and redrawing the
unchanged part of the screen will always improve performance in these
cases.
Problem: 'winfixwidth' is not always respected by :close.
Solution: Prefer a frame without 'winfixwidth' or 'winfixheight'. (Jason
Franklin)
c136af29c0
Problem: When 'wfh' is set ":bel 10new" scrolls window. (Andrew Pyatkov)
Solution: Set the fraction before changing the window height. (closesvim/vim#2798)
98da6ecab9
Problem: "gf" and <cfile> don't accept ? and & in URL. (Dmitrii Tcyganok)
Solution: Check for a URL and allow for extra characters. (closesvim/vim#2493)
9e3dfc6501
Problem: Possible crash when window can be zero lines high. (Joseph
Dornisch)
Solution: Only set w_fraction if the window is at least two lines high.
3679c17917
Problem: Acessing freed memory after window command in auto command.
(gy741)
Solution: Adjust the pointer in the parent frame. (Christian Brabandt,
closesvim/vim#2467)
6f361c9912
Problem: Splitting a 'winfixwidth' window vertically makes it one column
smaller. (Dominique Pelle)
Solution: Add one to the width for the separator.
38e3483637
Problem: Cannot make Vim fail on an internal error.
Solution: Add IEMSG() and IEMSG2(). (Domenique Pelle) Avoid reporting an
internal error without mentioning where.
95f096030e
Signed-off-by: Michael Schupikov <michael@schupikov.de>
closes#7429
Problem: after a help window was closed, a window was selected and its
autocommands triggered. After that, restore_snapshot was called and the
focused window changed, confusing the user.
Solution: Add function get_snapshot_focus() that returns the window that
holds the cursor in a snapshot. Use this function in win_close to make
sure the right window is selected before any autocommand is triggered.