Mercurial > vim
comparison src/if_py_both.h @ 28950:44481ae7c7ce v8.2.4997
patch 8.2.4997: Python: changing hidden buffer can cause display mess up
Commit: https://github.com/vim/vim/commit/37233f6022b3ed16985a91d22752b3ca162e21d0
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun May 22 12:23:48 2022 +0100
patch 8.2.4997: Python: changing hidden buffer can cause display mess up
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 22 May 2022 13:30:03 +0200 |
parents | c0403cd5ca06 |
children | 89e1d67814a9 |
comparison
equal
deleted
inserted
replaced
28949:d9df9758824e | 28950:44481ae7c7ce |
---|---|
4674 // Adjust marks. Invalidate any which lie in the | 4674 // Adjust marks. Invalidate any which lie in the |
4675 // changed range, and move any in the remainder of the buffer. | 4675 // changed range, and move any in the remainder of the buffer. |
4676 // Only adjust marks if we managed to switch to a window that holds | 4676 // Only adjust marks if we managed to switch to a window that holds |
4677 // the buffer, otherwise line numbers will be invalid. | 4677 // the buffer, otherwise line numbers will be invalid. |
4678 if (save_curbuf.br_buf == NULL) | 4678 if (save_curbuf.br_buf == NULL) |
4679 { | |
4679 mark_adjust((linenr_T)lo, (linenr_T)(hi - 1), | 4680 mark_adjust((linenr_T)lo, (linenr_T)(hi - 1), |
4680 (long)MAXLNUM, (long)extra); | 4681 (long)MAXLNUM, (long)extra); |
4681 changed_lines((linenr_T)lo, 0, (linenr_T)hi, (long)extra); | 4682 changed_lines((linenr_T)lo, 0, (linenr_T)hi, (long)extra); |
4683 } | |
4682 | 4684 |
4683 if (buf == curbuf && (switchwin.sw_curwin != NULL | 4685 if (buf == curbuf && (switchwin.sw_curwin != NULL |
4684 || save_curbuf.br_buf == NULL)) | 4686 || save_curbuf.br_buf == NULL)) |
4685 // Using an existing window for the buffer, adjust the cursor | 4687 // Using an existing window for the buffer, adjust the cursor |
4686 // position. | 4688 // position. |