patch 9.0.1044: setting window height using Python may cause errors
Problem: Setting window height using Python may cause errors.
Solution: When setting "curwin" also set "curbuf". (closes #11687)
diff --git a/src/if_py_both.h b/src/if_py_both.h
index 8dd7f09..110de23 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -4081,10 +4081,12 @@
#endif
savewin = curwin;
curwin = self->win;
+ curbuf = curwin->w_buffer;
VimTryStart();
win_setheight((int) height);
curwin = savewin;
+ curbuf = curwin->w_buffer;
if (VimTryEnd())
return -1;
@@ -4103,10 +4105,12 @@
#endif
savewin = curwin;
curwin = self->win;
+ curbuf = curwin->w_buffer;
VimTryStart();
win_setwidth((int) width);
curwin = savewin;
+ curbuf = curwin->w_buffer;
if (VimTryEnd())
return -1;