Change undodir regex conditional

undodir is set to '.' by default.

'^\.\%(,\|$\)' will accept the default and if '.' if the first on a
list, the option is set, as intended.
This commit is contained in:
Zeh Rizzatti
2013-01-07 01:47:06 -03:00
committed by Tim Pope
parent d2cdd0014a
commit cb4b85e1d2

View File

@@ -61,7 +61,7 @@ if isdirectory(expand('~/.cache/vim'))
if &backupdir =~# '^\.,'
set backupdir^=~/.cache/vim/backup//
endif
if exists('+undodir') && &undodir =~# '^\.,'
if exists('+undodir') && &undodir =~# '^\.\%(,\|$\)'
set undodir^=~/.cache/vim/undo//
endif
endif