From 159b6d2445240b4b459305dfbfea45e7e66d6a2c Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 9 May 2022 18:26:09 +1200 Subject: Move saved views into $XDG_STATE_HOME --- vim/vimrc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index 73ccd314..a078c6c8 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -340,12 +340,12 @@ endif " directories of this type. This isn't a comma-separated list like the others " ('backupdir', 'directory', 'spell', 'undodir') " -if exists('s:xdgcachehome') && s:xdgcachehome !=# '' && has('mksession') - if !isdirectory(s:xdgcachehome.'/view') - call mkdir(s:xdgcachehome.'/view', 'p', 0700) +if exists('s:xdgstatehome') && s:xdgstatehome !=# '' && has('mksession') + if !isdirectory(s:xdgstatehome.'/view') + call mkdir(s:xdgstatehome.'/view', 'p', 0700) endif execute 'set viewdir='.option#Escape(option#item#Escape( - \ s:xdgcachehome.'/view' + \ s:xdgstatehome.'/view' \)) endif -- cgit v1.2.3