mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-08 11:33:48 -05:00
Originally the plugin used fresh temp files for every diff. But it wrote to those files with `:write` which made Vim's buffer numbers increase unnecessarily (see #297) so the plugin changed to reuse the same temp files each time (seea871d857). However this has the problem that after Vim has been open for a while, e.g. a few days, the operating system can clean up the temp directory holding those temp files. The next time the plugin runs a diff, Vim throws an error because it cannot write to the temp files because their directory has disappeared (see #395, #433). In the meantime the plugin changed how it writes the temp files to use `writefile()` (see4e911819). This removed the problem of rapidly increasing buffer numbers. Now the buffer number problem has gone, the plugin can revert to using fresh temp files each time.