fix(events): avoid unnecessary CursorMoved (#24675)

Problem:    Temporarily changing current window in a script causes
            CursorMoved to be triggerd.
Solution:   Don't trigger CursorMoved if neither curwin nor cursor
            changed between two checks.
This commit is contained in:
zeertzjq
2023-08-12 09:50:17 +08:00
committed by GitHub
parent 6c07a189f2
commit 58a1ef8e6a
9 changed files with 44 additions and 24 deletions

View File

@@ -4943,7 +4943,6 @@ static void win_enter_ext(win_T *const wp, const int flags)
if (other_buffer) {
apply_autocmds(EVENT_BUFENTER, NULL, NULL, false, curbuf);
}
curwin->w_last_cursormoved.lnum = 0;
}
maketitle();