diff src/move.c @ 22886:38324d4f1c94 v8.2.1990

patch 8.2.1990: cursor position wrong in terminal popup with finished job Commit: https://github.com/vim/vim/commit/6a07644db30cb5f3d0c6dc5eb2c348b6289da553 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Nov 15 20:32:58 2020 +0100 patch 8.2.1990: cursor position wrong in terminal popup with finished job Problem: Cursor position wrong in terminal popup with finished job. Solution: Only add the top and left offset when not done already. (closes #7298)
author Bram Moolenaar <Bram@vim.org>
date Sun, 15 Nov 2020 20:45:03 +0100
parents 53b996eb5e76
children 255473b88c8e
line wrap: on
line diff
--- a/src/move.c
+++ b/src/move.c
@@ -868,6 +868,7 @@ validate_cursor_col(void)
 	curwin->w_wcol = col;
 
 	curwin->w_valid |= VALID_WCOL;
+	curwin->w_flags &= ~WFLAG_WCOL_OFF_ADDED;
     }
 }
 
@@ -1180,7 +1181,10 @@ curs_columns(
     {
 	curwin->w_wrow += popup_top_extra(curwin);
 	curwin->w_wcol += popup_left_extra(curwin);
+	curwin->w_flags |= WFLAG_WCOL_OFF_ADDED + WFLAG_WROW_OFF_ADDED;
     }
+    else
+	curwin->w_flags &= ~(WFLAG_WCOL_OFF_ADDED + WFLAG_WROW_OFF_ADDED);
 #endif
 
     // now w_leftcol is valid, avoid check_cursor_moved() thinking otherwise