Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

avoid overwriting 'path'; restore it after use

  • Loading branch information...
commit f569e6f6faba4a7aa0010a99a4d0f5177d3bb4c9 1 parent 23483b7
Samuel Ferencik authored
Showing with 13 additions and 2 deletions.
  1. +13 −2 ftplugin/perl.vim
View
15 ftplugin/perl.vim
@@ -60,11 +60,22 @@ if !exists("perlpath")
endif
endif
-let &l:path=perlpath
+" Append perlpath to the existing path value, if it is set. Since we don't
+" use += to do it because of the commas in perlpath, we have to handle the
+" global / local settings, too.
+if &l:path == ""
+ if &g:path == ""
+ let &l:path=perlpath
+ else
+ let &l:path=&g:path.",".perlpath
+ endif
+else
+ let &l:path=&l:path.",".perlpath
+endif
"---------------------------------------------
" Undo the stuff we changed.
-let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isf< kp<" .
+let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isf< kp< path<" .
\ " | unlet! b:browsefilter"
" Restore the saved compatibility options.
Please sign in to comment.
Something went wrong with that request. Please try again.