Mercurial > vim-gutentags
comparison autoload/gutentags.vim @ 258:74a71a5499c9
Purge path before chdir
When gutentags try to chdir to a path like E:\\\\vim\\good\\, it will fail.
So we need remove duplicate pathseps.
And "/" works on windows. So I replace all pathsep to '/'
author | zoumi <zoumi@users.noreply.github.com> |
---|---|
date | Sun, 19 Jan 2020 11:13:13 +0800 |
parents | 52be4cf89810 |
children | a282d08e0e7c |
comparison
equal
deleted
inserted
replaced
257:81d51b4a2a78 | 258:74a71a5499c9 |
---|---|
6 if has('nvim') | 6 if has('nvim') |
7 let chdir = haslocaldir() ? 'lcd' : haslocaldir(-1, 0) ? 'tcd' : 'cd' | 7 let chdir = haslocaldir() ? 'lcd' : haslocaldir(-1, 0) ? 'tcd' : 'cd' |
8 else | 8 else |
9 let chdir = haslocaldir() ? 'lcd' : 'cd' | 9 let chdir = haslocaldir() ? 'lcd' : 'cd' |
10 endif | 10 endif |
11 execute chdir a:path | 11 execute chdir substitute(a:path,'[\\/]\+','/','g') |
12 endfunction | 12 endfunction |
13 | 13 |
14 " Throw an exception message. | 14 " Throw an exception message. |
15 function! gutentags#throw(message) | 15 function! gutentags#throw(message) |
16 throw "gutentags: " . a:message | 16 throw "gutentags: " . a:message |