Skip to content

Removed &modified variable#2

Open
byjadams wants to merge 1 commit into
vim-scripts:masterfrom
byjadams:patch-1
Open

Removed &modified variable#2
byjadams wants to merge 1 commit into
vim-scripts:masterfrom
byjadams:patch-1

Conversation

@byjadams

Copy link
Copy Markdown

This seems like an unnecessary step. The postsave_hook is ran after saving so there's no need to check for the modified status.

The was_modified variable was set to the &modified option value which is on (true) just before writing the file. After the file is saved the option will be off (false). Then it checks the variable and inverts the option value for the && operator.

This seems like an unnecessary step. The postsave_hook is ran after saving so there's no need to check for the modified status.

The was_modified variable was set to the &modified option value which is on (true) just before writing the file. After the file is saved the option will be off (false). Then it checks the variable and inverts the option value for the && operator.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant