Skip to content

Commit

Permalink
Bug fix: Expand ~ to $HOME manually on Win32
Browse files Browse the repository at this point in the history
While testing the plug-in on Microsoft Windows I found out that ~ in
the &tags option isn't expanded to $HOME by either Vim or Ctags.
Unfortunately while committing all of my fixes to get Windows
support working (a few commits ago) I seem to have lost this fix.

While testing this fix again I now notice the tags file getting
corrupted in my Windows XP virtual machine -- more debugging to do.
  • Loading branch information
xolox committed Jun 10, 2010
1 parent 1c8733e commit 71cc2ef
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions easytags.vim
Expand Up @@ -82,10 +82,15 @@ let s:expanded = map(copy(s:tagfiles), 'expand(v:val)')

" Add the tags file to the &tags option when the user hasn't done so already.
if index(s:expanded, expand(g:easytags_file)) == -1
let &tags = xolox#option#join_tags(insert(s:tagfiles, g:easytags_file, 0))
let s:entry = g:easytags_file
if (has('win32') || has('win64')) && s:entry =~ '^\~[\\/]'
" On UNIX you can use ~/ in &tags but on Windows that doesn't work.
let s:entry = expand(s:entry)
endif
let &tags = xolox#option#join_tags(insert(s:tagfiles, s:entry, 0))
endif

unlet s:tagfiles s:expanded
unlet s:tagfiles s:expanded s:entry

" The :UpdateTags and :HighlightTags commands. {{{1

Expand Down

0 comments on commit 71cc2ef

Please sign in to comment.