mirror of
https://github.com/gryf/tagbar.git
synced 2026-05-11 00:42:59 +02:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a76d07cfeb | |||
| 40d8edf505 | |||
| 1f4713d4ab |
+8
-3
@@ -3,7 +3,7 @@
|
||||
Author: Jan Larres <jan@majutsushi.net>
|
||||
Licence: Vim licence, see |license|
|
||||
Homepage: http://majutsushi.github.com/tagbar/
|
||||
Version: 2.0
|
||||
Version: 2.0.1
|
||||
|
||||
==============================================================================
|
||||
Contents *tagbar* *tagbar-contents*
|
||||
@@ -339,7 +339,9 @@ g:tagbar_sort~
|
||||
Default: 1
|
||||
|
||||
If this option is set the tags are sorted according to their name. If it is
|
||||
unset they are sorted according to their order in the source file.
|
||||
unset they are sorted according to their order in the source file. Note that
|
||||
in the second case Pseudo-tags are always sorted before normal tags of the
|
||||
same kind since they don't have a real position in the file.
|
||||
|
||||
Example:
|
||||
>
|
||||
@@ -778,10 +780,13 @@ files.
|
||||
==============================================================================
|
||||
8. History *tagbar-history*
|
||||
|
||||
2.0.1 (2011-04-26)
|
||||
- Fix sorting bug when 'ignorecase' is set
|
||||
|
||||
2.0 (2011-04-26)
|
||||
- Folding now works correctly. Folds will be preserved when leaving the
|
||||
Tagbar window and when switching between files. Also tag types can be
|
||||
configured to be folded by default, which is usefult for things like
|
||||
configured to be folded by default, which is useful for things like
|
||||
includes and imports.
|
||||
- DoctorJS/jsctags and other compatible programs are now supported.
|
||||
- All of the highlight groups can now be overridden.
|
||||
|
||||
+12
-12
@@ -4,7 +4,7 @@
|
||||
" Author: Jan Larres <jan@majutsushi.net>
|
||||
" Licence: Vim licence
|
||||
" Website: http://majutsushi.github.com/tagbar/
|
||||
" Version: 2.0
|
||||
" Version: 2.0.1
|
||||
" Note: This plugin was heavily inspired by the 'Taglist' plugin by
|
||||
" Yegappan Lakshmanan and uses a small amount of code from it.
|
||||
"
|
||||
@@ -1575,7 +1575,7 @@ function! s:ParseTagline(part1, part2, typeinfo, fileinfo)
|
||||
let pattern = join(basic_info[2:], "\t")
|
||||
let start = 2 " skip the slash and the ^
|
||||
let end = strlen(pattern) - 1
|
||||
if pattern[end - 1] == '$'
|
||||
if pattern[end - 1] ==# '$'
|
||||
let end -= 1
|
||||
let dollar = '\$'
|
||||
else
|
||||
@@ -1650,9 +1650,9 @@ function! s:AddScopedTags(tags, processedtags, parent, depth,
|
||||
" or at least a proper grandchild with pseudo-tags in between. If it
|
||||
" is a direct child also check for matching scope.
|
||||
let is_cur_tag .= ' &&
|
||||
\ (v:val.path == curpath ||
|
||||
\ (v:val.path ==# curpath ||
|
||||
\ match(v:val.path, ''\V\^\C'' . curpath . a:typeinfo.sro) == 0) &&
|
||||
\ (v:val.path == curpath ? (v:val.scope == pscope) : 1)'
|
||||
\ (v:val.path ==# curpath ? (v:val.scope ==# pscope) : 1)'
|
||||
endif
|
||||
|
||||
let curtags = filter(copy(a:tags), is_cur_tag)
|
||||
@@ -1732,7 +1732,7 @@ function! s:ProcessPseudoTag(curtags, tag, parent, typeinfo, fileinfo)
|
||||
let pseudotag.children = [a:tag]
|
||||
|
||||
" get all the other (direct) children of the current pseudo-tag
|
||||
let ispseudochild = 'v:val.path == a:tag.path && v:val.scope == a:tag.scope'
|
||||
let ispseudochild = 'v:val.path ==# a:tag.path && v:val.scope ==# a:tag.scope'
|
||||
let pseudochildren = filter(copy(a:curtags), ispseudochild)
|
||||
if !empty(pseudochildren)
|
||||
call filter(a:curtags, '!(' . ispseudochild . ')')
|
||||
@@ -1819,27 +1819,27 @@ endfunction
|
||||
function! s:CompareByKind(tag1, tag2)
|
||||
let typeinfo = s:compare_typeinfo
|
||||
|
||||
if typeinfo.kinddict[a:tag1.fields.kind] <
|
||||
if typeinfo.kinddict[a:tag1.fields.kind] <#
|
||||
\ typeinfo.kinddict[a:tag2.fields.kind]
|
||||
return -1
|
||||
elseif typeinfo.kinddict[a:tag1.fields.kind] >
|
||||
elseif typeinfo.kinddict[a:tag1.fields.kind] >#
|
||||
\ typeinfo.kinddict[a:tag2.fields.kind]
|
||||
return 1
|
||||
else
|
||||
" Ignore '~' prefix for C++ destructors to sort them directly under
|
||||
" the constructors
|
||||
if a:tag1.name[0] == '~'
|
||||
if a:tag1.name[0] ==# '~'
|
||||
let name1 = a:tag1.name[1:]
|
||||
else
|
||||
let name1 = a:tag1.name
|
||||
endif
|
||||
if a:tag2.name[0] == '~'
|
||||
if a:tag2.name[0] ==# '~'
|
||||
let name2 = a:tag2.name[1:]
|
||||
else
|
||||
let name2 = a:tag2.name
|
||||
endif
|
||||
|
||||
if name1 <= name2
|
||||
if name1 <=# name2
|
||||
return -1
|
||||
else
|
||||
return 1
|
||||
@@ -1902,7 +1902,7 @@ function! s:RenderContent(...)
|
||||
endif
|
||||
|
||||
if !empty(s:known_files.getCurrent()) &&
|
||||
\ fileinfo.fpath == s:known_files.getCurrent().fpath
|
||||
\ fileinfo.fpath ==# s:known_files.getCurrent().fpath
|
||||
" We're redisplaying the same file, so save the view
|
||||
let saveline = line('.')
|
||||
let savecol = col('.')
|
||||
@@ -1935,7 +1935,7 @@ function! s:RenderContent(...)
|
||||
setlocal nomodifiable
|
||||
|
||||
if !empty(s:known_files.getCurrent()) &&
|
||||
\ fileinfo.fpath == s:known_files.getCurrent().fpath
|
||||
\ fileinfo.fpath ==# s:known_files.getCurrent().fpath
|
||||
let scrolloff_save = &scrolloff
|
||||
set scrolloff=0
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
" Author: Jan Larres <jan@majutsushi.net>
|
||||
" Licence: Vim licence
|
||||
" Website: http://majutsushi.github.com/tagbar/
|
||||
" Version: 2.0
|
||||
" Version: 2.0.1
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
|
||||
Reference in New Issue
Block a user