mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-08 11:33:48 -05:00
Both `:file` and `:saveas` rename the current file.
`:file` does not write the newly named file to disk, and keeps the same
buffer. It fires a single `BufFilePre` / `BufFilePost` pair of
autocommands:
`BufFilePre` buffer
`BufFilePost` buffer
`:saveas` does write the newly named file to disk, in a new buffer. It
fires two pairs of `BufFilePre` / `BufFilePost` autocommands:
`BufFilePre` original buffer
`BufFilePre` new buffer
`BufFilePost` original buffer
`BufFilePost` new buffer
In both cases the cached path needs to be cleared.
See #860, #551.
Fixes #865.