FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Include "" and "." in 'path' · vim-ruby/vim-ruby@b1bcdca · GitHub

Commit b1bcdca

Browse files
committed
Include "" and "." in 'path'
References: vim/vim#9133
1 parent 366def6 commit b1bcdca

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎ftplugin/ruby.vim‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,14 @@ endfunction
8686

8787
function! s:build_path(path) abort
8888
let path = join(map(copy(a:path), 'v:val ==# "." ? "" : v:val'), ',')
89-
if &g:path !~# '\v^%(\.,)=%(/%(usr|emx)/include,)=,$'
90-
let path = substitute(&g:path,',,$',',','') . ',' . path
89+
if &g:path =~# '\v^%(\.,)=%(/%(usr|emx)/include,)=,$'
90+
let path = path . ',.,,'
91+
elseif &g:path =~# ',\.,,$'
92+
let path = &g:path[0:-4] . path . ',.,,'
93+
elseif &g:path =~# ',,$'
94+
let path = &g:path[0:-2] . path . ',,'
95+
else
96+
let path = substitute(&g:path, '[^,]\zs$', ',', '') . path
9197
endif
9298
return path
9399
endfunction

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL