summaryrefslogtreecommitdiffstats
path: root/src/move.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/move.c')
-rw-r--r--src/move.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/move.c b/src/move.c
index e5309df486..46e4f358dc 100644
--- a/src/move.c
+++ b/src/move.c
@@ -3571,6 +3571,14 @@ halfpage(int flag, linenr_T Prenum)
void
do_check_cursorbind(void)
{
+ static win_T *prev_curwin = NULL;
+ static pos_T prev_cursor = {0, 0, 0};
+
+ if (curwin == prev_curwin && EQUAL_POS(curwin->w_cursor, prev_cursor))
+ return;
+ prev_curwin = curwin;
+ prev_cursor = curwin->w_cursor;
+
linenr_T line = curwin->w_cursor.lnum;
colnr_T col = curwin->w_cursor.col;
colnr_T coladd = curwin->w_cursor.coladd;