diff options
author | Christian Brabandt <cb@256bit.org> | 2021-10-16 11:58:55 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-10-16 11:58:55 +0100 |
commit | db3b44640d69ab27270691a3cab8d83cc93a0861 (patch) | |
tree | 7ed9b25f311e2b6b1790cb0903314493f5e460c2 /src/edit.c | |
parent | 7b5f45be2197403d631b5a3d633f6a20afdf806e (diff) | |
download | vim-git-db3b44640d69ab27270691a3cab8d83cc93a0861.tar.gz |
patch 8.2.3517: TextChanged does not trigger after TextChangedIv8.2.3517
Problem: TextChanged does not trigger after TextChangedI.
Solution: Store the tick separately for TextChangedI. (Christian Brabandt,
closes #8968, closes #8932)
Diffstat (limited to 'src/edit.c')
-rw-r--r-- | src/edit.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/edit.c b/src/edit.c index 4f8e37401..686c6d429 100644 --- a/src/edit.c +++ b/src/edit.c @@ -1477,9 +1477,9 @@ ins_redraw(int ready) // not busy with something last_cursormoved = curwin->w_cursor; } - // Trigger TextChangedI if b_changedtick differs. + // Trigger TextChangedI if b_changedtick_i differs. if (ready && has_textchangedI() - && curbuf->b_last_changedtick != CHANGEDTICK(curbuf) + && curbuf->b_last_changedtick_i != CHANGEDTICK(curbuf) && !pum_visible()) { aco_save_T aco; @@ -1489,15 +1489,15 @@ ins_redraw(int ready) // not busy with something aucmd_prepbuf(&aco, curbuf); apply_autocmds(EVENT_TEXTCHANGEDI, NULL, NULL, FALSE, curbuf); aucmd_restbuf(&aco); - curbuf->b_last_changedtick = CHANGEDTICK(curbuf); + curbuf->b_last_changedtick_i = CHANGEDTICK(curbuf); if (tick != CHANGEDTICK(curbuf)) // see ins_apply_autocmds() u_save(curwin->w_cursor.lnum, (linenr_T)(curwin->w_cursor.lnum + 1)); } - // Trigger TextChangedP if b_changedtick differs. When the popupmenu closes - // TextChangedI will need to trigger for backwards compatibility, thus use - // different b_last_changedtick* variables. + // Trigger TextChangedP if b_changedtick_pum differs. When the popupmenu + // closes TextChangedI will need to trigger for backwards compatibility, + // thus use different b_last_changedtick* variables. if (ready && has_textchangedP() && curbuf->b_last_changedtick_pum != CHANGEDTICK(curbuf) && pum_visible()) |