> It will also trigger for :diffthis. Not for "set nodiff", since that
> doesn't update diffs, like the FilterWritePost event also didn't.
>
> With internal diff it will trigger more often, e.g. when deleting a
> word or undo/redo
>
That is great. I found it in patch 8.1.397.
However, if apply_autocmds() is moved from ex_diffupdate() to diff_redraw()
like below, the event is triggered on all the diff-related commands including
'diffoff' and 'set nodiff'. It is consistent and more useful for a plugin
script. Does that make sense?
Regards,
Rick
P.S.
we need to add 'DiffUpdated' in syntax/vim.vim, right?
--- diff397.c 2018-09-17 07:44:53.688021100 +0900
+++ diff.c 2018-09-17 23:07:40.803496500 +0900
@@ -676,6 +676,8 @@
check_topfill(wp, FALSE);
}
}
+
+ apply_autocmds(EVENT_DIFFUPDATED, NULL, NULL, FALSE, curbuf);
}
static void
@@ -949,8 +951,6 @@
curwin->w_valid_cursor.lnum = 0;
diff_redraw(TRUE);
-
- apply_autocmds(EVENT_DIFFUPDATED, NULL, NULL, FALSE, curbuf);
}
/*
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.