mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 05:28:33 +00:00
vim-patch:9.0.2075: TextChangedI may not always trigger (#25808)
Problem: TextChangedI may not always trigger
Solution: trigger it in more cases: for insert/
append/change operations, and when
opening a new line,
fixes: vim/vim#13367
closes: vim/vim#13375
4bca4897a1
Co-authored-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@@ -6226,6 +6226,9 @@ void do_pending_operator(cmdarg_T *cap, int old_col, bool gui_yank)
|
||||
// Restore linebreak, so that when the user edits it looks as before.
|
||||
restore_lbr(lbr_saved);
|
||||
|
||||
// trigger TextChangedI
|
||||
curbuf->b_last_changedtick_i = buf_get_changedtick(curbuf);
|
||||
|
||||
if (op_change(oap)) { // will call edit()
|
||||
cap->retval |= CA_COMMAND_BUSY;
|
||||
}
|
||||
@@ -6324,6 +6327,9 @@ void do_pending_operator(cmdarg_T *cap, int old_col, bool gui_yank)
|
||||
// Restore linebreak, so that when the user edits it looks as before.
|
||||
restore_lbr(lbr_saved);
|
||||
|
||||
// trigger TextChangedI
|
||||
curbuf->b_last_changedtick_i = buf_get_changedtick(curbuf);
|
||||
|
||||
op_insert(oap, cap->count1);
|
||||
|
||||
// Reset linebreak, so that formatting works correctly.
|
||||
|
Reference in New Issue
Block a user