diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-14 17:39:51 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-14 17:39:51 +1200 |
commit | 30ace50e923b188ad60530bda64ab71272383625 (patch) | |
tree | 2fd931f119f77256e83aa81ccded9c33a4f39473 /vim/autoload/filetype.vim | |
parent | Merge branch 'release/v6.0.0' (diff) | |
parent | Bump VERSION (diff) | |
download | dotfiles-a157249eb432b4975da7989f540210b7705208f8.tar.gz (sig) dotfiles-a157249eb432b4975da7989f540210b7705208f8.zip |
Merge branch 'release/v6.1.0'v6.1.0
* release/v6.1.0:
Allow periods in sudo-ed filenames
Diffstat (limited to 'vim/autoload/filetype.vim')
-rw-r--r-- | vim/autoload/filetype.vim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vim/autoload/filetype.vim b/vim/autoload/filetype.vim index 79df3b28..6a66d62e 100644 --- a/vim/autoload/filetype.vim +++ b/vim/autoload/filetype.vim @@ -44,13 +44,13 @@ function! filetype#SudoRepeat() abort let fn = expand('<afile>') " myfileXXQGS16A.conf: strip eight chars before final period - if fn =~# '/[^./]\+\w\{8}\.[^./]\+$' + if fn =~# '/[^/]\+\w\{8}\.[^./]\+$' let fr = expand('<afile>:r') let fe = expand('<afile>:e') let fn = strpart(fr, -8, strlen(fr)) . '.' . fe " myfile.XXQGS16A: strip extension - elseif fn =~# '/[^./]\+\.\w\{8}$' + elseif fn =~# '/[^/]\+\.\w\{8}$' let fn = expand('<afile>:r') " Unrecognised pattern; return, don't repeat |