summaryrefslogtreecommitdiffstats
path: root/src/if_py_both.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-12-10 11:17:11 +0000
committerBram Moolenaar <Bram@vim.org>2022-12-10 11:17:11 +0000
commit6c87bbb4e45515e70ac1728cabd1451063bf427d (patch)
tree575f7a17f99c68755647ef8265af11dd28f95065 /src/if_py_both.h
parentc51a376265708e49a46832816077b6dd27d12c0c (diff)
patch 9.0.1044: setting window height using Python may cause errorsv9.0.1044
Problem: Setting window height using Python may cause errors. Solution: When setting "curwin" also set "curbuf". (closes #11687)
Diffstat (limited to 'src/if_py_both.h')
-rw-r--r--src/if_py_both.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/if_py_both.h b/src/if_py_both.h
index 8dd7f09b55..110de234fd 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -4081,10 +4081,12 @@ WindowSetattr(WindowObject *self, char *name, PyObject *valObject)
#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 @@ WindowSetattr(WindowObject *self, char *name, PyObject *valObject)
#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;