aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2014-08-17 22:02:02 +0000
committerJustin M. Keyes <justinkz@gmail.com>2014-08-19 01:38:15 -0400
commit8ae492bb5af3e1b086f8fa48946c07aa2660da59 (patch)
tree2a628fb48c3f707d9d87570e4977cbd48d616c5c /src/nvim/window.c
parenta0e593e26163c730e75a362dcc9e34a645021aff (diff)
downloadrneovim-8ae492bb5af3e1b086f8fa48946c07aa2660da59.tar.gz
rneovim-8ae492bb5af3e1b086f8fa48946c07aa2660da59.tar.bz2
rneovim-8ae492bb5af3e1b086f8fa48946c07aa2660da59.zip
vim-patch:7.4.325 #1078
Problem: When starting the gui and changing the window size the status line may not be drawn correctly. Solution: Catch new_win_height() being called recursively. (Christian Brabandt) https://code.google.com/p/vim/source/detail?r=1f288d247548
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r--src/nvim/window.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index 52401a12ee..ca56c9d5d5 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -4484,7 +4484,12 @@ void win_new_height(win_T *wp, int height)
if (wp->w_height > 0) {
if (wp == curwin) {
- validate_cursor(); // w_wrow needs to be valid
+ // w_wrow needs to be valid. When setting 'laststatus' this may
+ // call win_new_height() recursively.
+ validate_cursor();
+ }
+ if (wp->w_height != prev_height) {
+ return; // Recursive call already changed the size, bail out.
}
if (wp->w_wrow != wp->w_prev_fraction_row) {
set_fraction(wp);