summaryrefslogtreecommitdiff
path: root/src/if_py_both.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-05-22 12:23:48 +0100
committerBram Moolenaar <Bram@vim.org>2022-05-22 12:23:48 +0100
commit37233f6022b3ed16985a91d22752b3ca162e21d0 (patch)
tree7acd09e661dae2e3d293f5feda74af1f021e05f1 /src/if_py_both.h
parent0ad00a7fd3e0389f565876521e395c35144d8009 (diff)
downloadvim-git-37233f6022b3ed16985a91d22752b3ca162e21d0.tar.gz
patch 8.2.4997: Python: changing hidden buffer can cause display mess upv8.2.4997
Problem: Python: changing hidden buffer can cause the display to be messed up. Solution: Do not mark changed lines when using another buffer. (Paul Ollis, closes #10437, closes #7972)
Diffstat (limited to 'src/if_py_both.h')
-rw-r--r--src/if_py_both.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/if_py_both.h b/src/if_py_both.h
index 0d0a5cef2..240cc966a 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -4676,9 +4676,11 @@ SetBufferLineList(
// Only adjust marks if we managed to switch to a window that holds
// the buffer, otherwise line numbers will be invalid.
if (save_curbuf.br_buf == NULL)
+ {
mark_adjust((linenr_T)lo, (linenr_T)(hi - 1),
(long)MAXLNUM, (long)extra);
- changed_lines((linenr_T)lo, 0, (linenr_T)hi, (long)extra);
+ changed_lines((linenr_T)lo, 0, (linenr_T)hi, (long)extra);
+ }
if (buf == curbuf && (switchwin.sw_curwin != NULL
|| save_curbuf.br_buf == NULL))