diff options
Diffstat (limited to 'vim/vimrc')
-rw-r--r-- | vim/vimrc | 21 |
1 files changed, 13 insertions, 8 deletions
@@ -324,14 +324,19 @@ else set backupdir^=$MYVIM/cache/backup endif -" Vim doesn't seem to check patterns added to 'backupskip' for uniqueness, so -" adding them repeatedly if this file is reloaded results in duplicate strings -" in the value, due to the absence of the P_NODUP flag for the option's -" definition in src/option.c in the Vim source code. This is likely a bug in -" Vim. For the moment, to work around the problem, we reset the path back to -" its default first. -" -set backupskip& +" Prior to v8.1.1519, Vim didn't check patterns added to 'backupskip' for +" uniqueness, so adding the same path repeatedly resulted in duplicate strings +" in the value. This was due to the absence of the P_NODUP flag for the +" option's definition in src/option.c in the Vim source code. If we're using +" a version older than v8.1.1519, we'll need to explicitly reset 'backupskip' +" to its default value, so that reloading this file doesn't stack up multiple +" copies of any added paths. +" +" <https://github.com/vim/vim/releases/tag/v8.1.1519> +" +if !has('patch-8.1.1519') + set backupskip& +endif " Files in certain directories on Unix-compatible filesystems should not be " backed up, for security reasons. This is particularly important if editing |