summaryrefslogtreecommitdiff
path: root/src/move.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-11-15 20:32:58 +0100
committerBram Moolenaar <Bram@vim.org>2020-11-15 20:32:58 +0100
commit6a07644db30cb5f3d0c6dc5eb2c348b6289da553 (patch)
tree809c5c0da918231439589f9e34b23b86c8f0aac6 /src/move.c
parent2dfae04f376a58d4c5a801cb652c8eae65900672 (diff)
downloadvim-git-6a07644db30cb5f3d0c6dc5eb2c348b6289da553.tar.gz
patch 8.2.1990: cursor position wrong in terminal popup with finished jobv8.2.1990
Problem: Cursor position wrong in terminal popup with finished job. Solution: Only add the top and left offset when not done already. (closes #7298)
Diffstat (limited to 'src/move.c')
-rw-r--r--src/move.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/move.c b/src/move.c
index cd0af3e64..0a98f0347 100644
--- 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