aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/move.c
diff options
context:
space:
mode:
authorSean Dewar <seandewar@users.noreply.github.com>2022-01-06 13:48:37 +0000
committerSean Dewar <seandewar@users.noreply.github.com>2022-02-03 15:02:57 +0000
commitf326c9a77da3aef052ce6af0f851344f2479c844 (patch)
treecbfedb742e02d31852fed6c20a54fd78aaf289f0 /src/nvim/move.c
parentf5c4c1d7684d9d39dd469e10322ce6a5df5c3281 (diff)
downloadrneovim-f326c9a77da3aef052ce6af0f851344f2479c844.tar.gz
rneovim-f326c9a77da3aef052ce6af0f851344f2479c844.tar.bz2
rneovim-f326c9a77da3aef052ce6af0f851344f2479c844.zip
vim-patch:8.2.4018: ml_get error when win_execute redraws with Visual selection
Problem: ml_get error when win_execute redraws with Visual selection. Solution: Disable Visual area temporarily. (closes vim/vim#9479) https://github.com/vim/vim/commit/18f4740f043b353abe47b7a00131317052457686 {switch_to/restore}_win_for_buf is N/A (marked as such in v8.0.0860; currently only used in Vim's if_py). Add a modeline to test_execute_func.vim.
Diffstat (limited to 'src/nvim/move.c')
-rw-r--r--src/nvim/move.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/move.c b/src/nvim/move.c
index 67ec19903f..27cc2b341c 100644
--- a/src/nvim/move.c
+++ b/src/nvim/move.c
@@ -346,10 +346,10 @@ void update_topline(win_T *wp)
*/
void update_topline_win(win_T *win)
{
- win_T *save_curwin;
- switch_win(&save_curwin, NULL, win, NULL, true);
+ switchwin_T switchwin;
+ switch_win(&switchwin, win, NULL, true);
update_topline(curwin);
- restore_win(save_curwin, NULL, true);
+ restore_win(&switchwin, true);
}
/*