summaryrefslogtreecommitdiffstats
path: root/src/if_py_both.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-06-04 14:58:02 +0200
committerBram Moolenaar <Bram@vim.org>2017-06-04 14:58:02 +0200
commit45e5fd135da5710f24a1acc142692f120f8b0b78 (patch)
treedb3f8e21176d61550e6c7dbb75dc69faf614c272 /src/if_py_both.h
parent6e62da3e14d32f76f60d5cc8b267059923842f17 (diff)
patch 8.0.0607: after :bwipe + :new bufref might still be validv8.0.0607
Problem: When creating a bufref, then using :bwipe and :new it might get the same memory and bufref_valid() returns true. Solution: Add br_fnum to check the buffer number didn't change.
Diffstat (limited to 'src/if_py_both.h')
-rw-r--r--src/if_py_both.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/if_py_both.h b/src/if_py_both.h
index 78c70e700b..b6f232e495 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -4311,7 +4311,7 @@ restore_win_for_buf(
static int
SetBufferLine(buf_T *buf, PyInt n, PyObject *line, PyInt *len_change)
{
- bufref_T save_curbuf = {NULL, 0};
+ bufref_T save_curbuf = {NULL, 0, 0};
win_T *save_curwin = NULL;
tabpage_T *save_curtab = NULL;
@@ -4415,7 +4415,7 @@ SetBufferLineList(
PyObject *list,
PyInt *len_change)
{
- bufref_T save_curbuf = {NULL, 0};
+ bufref_T save_curbuf = {NULL, 0, 0};
win_T *save_curwin = NULL;
tabpage_T *save_curtab = NULL;
@@ -4616,7 +4616,7 @@ SetBufferLineList(
static int
InsertBufferLines(buf_T *buf, PyInt n, PyObject *lines, PyInt *len_change)
{
- bufref_T save_curbuf = {NULL, 0};
+ bufref_T save_curbuf = {NULL, 0, 0};
win_T *save_curwin = NULL;
tabpage_T *save_curtab = NULL;