fix: finish renaming to BufModifiedSet

This commit is contained in:
Rom Grk
2020-11-07 19:17:43 -05:00
parent c3a82fbae5
commit 56f842e873
2 changed files with 4 additions and 4 deletions

View File

@@ -7,7 +7,7 @@ return {
'BufFilePre', -- before renaming a buffer
'BufHidden', -- just after buffer becomes hidden
'BufLeave', -- before leaving a buffer
'BufModified', -- after the 'modified' state of a buffer changes
'BufModifiedSet', -- after the 'modified' state of a buffer changes
'BufNew', -- after creating any buffer
'BufNewFile', -- when creating a buffer for a new file
'BufReadCmd', -- read buffer using command
@@ -125,7 +125,7 @@ return {
-- List of nvim-specific events or aliases for the purpose of generating
-- syntax file
nvim_specific = {
BufModified=true,
BufModifiedSet=true,
DirChanged=true,
Signal=true,
TabClosed=true,

View File

@@ -1232,9 +1232,9 @@ static void normal_check_text_changed(NormalState *s)
static void normal_check_buffer_modified(NormalState *s)
{
// Trigger BufModified if b_modified changed
if (!finish_op && has_event(EVENT_BUFMODIFIED)
if (!finish_op && has_event(EVENT_BUFMODIFIEDSET)
&& curbuf->b_changed_notified == false) {
apply_autocmds(EVENT_BUFMODIFIED, NULL, NULL, false, curbuf);
apply_autocmds(EVENT_BUFMODIFIEDSET, NULL, NULL, false, curbuf);
curbuf->b_changed_notified = true;
}
}