diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-03-19 13:33:23 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-03-19 13:33:23 +0100 |
commit | 186628f67153726edf130015e2a8043a5d309c42 (patch) | |
tree | b78b09433f8bb96b50dc144fac757121f825c297 /src/edit.c | |
parent | 090cfc1b02d5dcd98ba414ccf56e69cc38f272bd (diff) | |
download | vim-186628f67153726edf130015e2a8043a5d309c42.zip |
updated for version 7.3.867
Problem: Matchparen does not update match when using auto-indenting.
(Marc Aldorasi)
Solution: Add the TextChanged and TextChangedI autocommand events.
Diffstat (limited to 'src/edit.c')
-rw-r--r-- | src/edit.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/edit.c b/src/edit.c index 88fd18af1..5d609519a 100644 --- a/src/edit.c +++ b/src/edit.c @@ -1593,6 +1593,21 @@ ins_redraw(ready) last_cursormoved = curwin->w_cursor; } #endif +#ifdef FEAT_AUTOCMD + /* Trigger TextChangedI if b_changedtick differs. */ + if (!ready && has_textchangedI() + && last_changedtick != curbuf->b_changedtick +# ifdef FEAT_INS_EXPAND + && !pum_visible() +# endif + ) + { + if (last_changedtick_buf == curbuf) + apply_autocmds(EVENT_TEXTCHANGEDI, NULL, NULL, FALSE, curbuf); + last_changedtick_buf = curbuf; + last_changedtick = curbuf->b_changedtick; + } +#endif if (must_redraw) update_screen(0); else if (clear_cmdline || redraw_cmdline) |