Permalink
Browse files

Bug fix: Sort tags files properly by folding to uppercase (issue #25)

  • Loading branch information...
xolox committed Jan 15, 2012
1 parent 31d1e15 commit 467519375d6b462bb28e2e1d490fa634a0bd7c69
Showing with 9 additions and 3 deletions.
  1. +9 −3 autoload/xolox/easytags.vim
@@ -1,9 +1,9 @@
" Vim script
" Author: Peter Odding <peter@peterodding.com>
" Last Change: January 6, 2012
" Last Change: January 15, 2012
" URL: http://peterodding.com/code/vim/easytags/
let g:xolox#easytags#version = '2.7.6'
let g:xolox#easytags#version = '2.8'
" Public interface through (automatic) commands. {{{1
@@ -489,7 +489,7 @@ function! xolox#easytags#write_tagsfile(tagsfile, headers, entries) " {{{2
if sort_order == 1
call sort(a:entries)
else
call sort(a:entries, 1)
call sort(a:entries, function('s:foldcase_compare'))
endif
let lines = []
if xolox#misc#os#is_win()
@@ -512,6 +512,12 @@ function! s:join_entry(value)
return type(a:value) == type([]) ? join(a:value, "\t") : a:value
endfunction
function! s:foldcase_compare(a, b)
let a = toupper(a:a)
let b = toupper(a:b)
return a == b ? 0 : a ># b ? 1 : -1
endfunction
function! xolox#easytags#file_has_tags(filename) " {{{2
" Check whether the given source file occurs in one of the tags files known
" to Vim. This function might not always give the right answer because of

0 comments on commit 4675193

Please sign in to comment.