aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-02-28 08:26:00 +0800
committerGitHub <noreply@github.com>2023-02-28 08:26:00 +0800
commit1b632e99f231baca8a640502a352aa68aee0568a (patch)
tree47047905f92ee23e728ddec757c49d23ea40afb5 /src/nvim/window.c
parent2630341db65772e0a636c2a1cfbd6bba8ca9b28d (diff)
downloadrneovim-1b632e99f231baca8a640502a352aa68aee0568a.tar.gz
rneovim-1b632e99f231baca8a640502a352aa68aee0568a.tar.bz2
rneovim-1b632e99f231baca8a640502a352aa68aee0568a.zip
vim-patch:9.0.1362: ml_get error when going to another tab (#22443)
Problem: ml_get error when going to another tab. (Daniel J. Perry) Solution: Do not call update_topline() if "curwin" is invalid. (closes vim/vim#11907) https://github.com/vim/vim/commit/99ad3a8bb95c6f860545a050472b6181e33bac1a Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r--src/nvim/window.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index 6a8d1cf740..38b7326363 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -4813,7 +4813,7 @@ static void win_enter_ext(win_T *const wp, const int flags)
// Might need to scroll the old window before switching, e.g., when the
// cursor was moved.
- if (*p_spk == 'c') {
+ if (*p_spk == 'c' && !curwin_invalid) {
update_topline(curwin);
}