comparison src/main.c @ 28375:e466fdbe0699 v8.2.4713

patch 8.2.4713: plugins cannot track text scrolling Commit: https://github.com/vim/vim/commit/0937182d49fa8db50cec42785f22f1031760a0bd Author: LemonBoy <thatlemon@gmail.com> Date: Fri Apr 8 15:18:45 2022 +0100 patch 8.2.4713: plugins cannot track text scrolling Problem: Plugins cannot track text scrolling. Solution: Add the WinScrolled event. (closes https://github.com/vim/vim/issues/10102)
author Bram Moolenaar <Bram@vim.org>
date Fri, 08 Apr 2022 16:30:03 +0200
parents 9849df834f1d
children aa9720c76412
comparison
equal deleted inserted replaced
28374:14d6f5ebf810 28375:e466fdbe0699
1333 && curbuf->b_last_changedtick != CHANGEDTICK(curbuf)) 1333 && curbuf->b_last_changedtick != CHANGEDTICK(curbuf))
1334 { 1334 {
1335 apply_autocmds(EVENT_TEXTCHANGED, NULL, NULL, FALSE, curbuf); 1335 apply_autocmds(EVENT_TEXTCHANGED, NULL, NULL, FALSE, curbuf);
1336 curbuf->b_last_changedtick = CHANGEDTICK(curbuf); 1336 curbuf->b_last_changedtick = CHANGEDTICK(curbuf);
1337 } 1337 }
1338
1339 // Ensure curwin->w_topline and curwin->w_leftcol are up to date
1340 // before triggering a WinScrolled autocommand.
1341 update_topline();
1342 validate_cursor();
1343
1344 if (!finish_op)
1345 may_trigger_winscrolled(curwin);
1338 1346
1339 // If nothing is pending and we are going to wait for the user to 1347 // If nothing is pending and we are going to wait for the user to
1340 // type a character, trigger SafeState. 1348 // type a character, trigger SafeState.
1341 may_trigger_safestate(!op_pending() && restart_edit == 0); 1349 may_trigger_safestate(!op_pending() && restart_edit == 0);
1342 1350