aboutsummaryrefslogtreecommitdiff
path: root/vim/vimrc
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2022-05-09 18:25:08 +1200
committerTom Ryder <tom@sanctum.geek.nz>2022-05-09 21:31:58 +1200
commit45ed42cf83e3a3f70cb90b10a65111419df1a88c (patch)
tree14846526657021879708e8ea1b0fcc434a2e7b48 /vim/vimrc
parentAdd XDG_STATE_HOME to XDG support (diff)
downloaddotfiles-45ed42cf83e3a3f70cb90b10a65111419df1a88c.tar.gz
dotfiles-45ed42cf83e3a3f70cb90b10a65111419df1a88c.zip
Move persistent undo files into $XDG_STATE_HOME
Diffstat (limited to 'vim/vimrc')
-rw-r--r--vim/vimrc8
1 files changed, 4 insertions, 4 deletions
diff --git a/vim/vimrc b/vim/vimrc
index c1ad9957..73ccd314 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -325,13 +325,13 @@ endif
" Support for these persistent undo file caches was not released until v7.3.0,
" so we need to check for the feature's presence before we enable it.
"
-if exists('s:xdgcachehome') && s:xdgcachehome !=# '' && has('persistent_undo')
+if exists('s:xdgstatehome') && s:xdgstatehome !=# '' && has('persistent_undo')
set undofile
- if !isdirectory(s:xdgcachehome.'/undo')
- call mkdir(s:xdgcachehome.'/undo', 'p', 0700)
+ if !isdirectory(s:xdgstatehome.'/undo')
+ call mkdir(s:xdgstatehome.'/undo', 'p', 0700)
endif
execute 'set undodir^='.option#Escape(option#item#Escape(
- \ s:xdgcachehome.'/undo//'
+ \ s:xdgstatehome.'/undo//'
\))
endif