|
4 | 4 | " Author: Jan Larres <jan@majutsushi.net> |
5 | 5 | " Licence: Vim licence |
6 | 6 | " Website: http://majutsushi.github.com/tagbar/ |
7 | | -" Version: 2.0 |
| 7 | +" Version: 2.0.1 |
8 | 8 | " Note: This plugin was heavily inspired by the 'Taglist' plugin by |
9 | 9 | " Yegappan Lakshmanan and uses a small amount of code from it. |
10 | 10 | " |
@@ -1575,7 +1575,7 @@ function! s:ParseTagline(part1, part2, typeinfo, fileinfo) |
1575 | 1575 | let pattern = join(basic_info[2:], "\t") |
1576 | 1576 | let start = 2 " skip the slash and the ^ |
1577 | 1577 | let end = strlen(pattern) - 1 |
1578 | | - if pattern[end - 1] == '$' |
| 1578 | + if pattern[end - 1] ==# '$' |
1579 | 1579 | let end -= 1 |
1580 | 1580 | let dollar = '\$' |
1581 | 1581 | else |
@@ -1650,9 +1650,9 @@ function! s:AddScopedTags(tags, processedtags, parent, depth, |
1650 | 1650 | " or at least a proper grandchild with pseudo-tags in between. If it |
1651 | 1651 | " is a direct child also check for matching scope. |
1652 | 1652 | let is_cur_tag .= ' && |
1653 | | - \ (v:val.path == curpath || |
| 1653 | + \ (v:val.path ==# curpath || |
1654 | 1654 | \ match(v:val.path, ''\V\^\C'' . curpath . a:typeinfo.sro) == 0) && |
1655 | | - \ (v:val.path == curpath ? (v:val.scope == pscope) : 1)' |
| 1655 | + \ (v:val.path ==# curpath ? (v:val.scope ==# pscope) : 1)' |
1656 | 1656 | endif |
1657 | 1657 |
|
1658 | 1658 | let curtags = filter(copy(a:tags), is_cur_tag) |
@@ -1732,7 +1732,7 @@ function! s:ProcessPseudoTag(curtags, tag, parent, typeinfo, fileinfo) |
1732 | 1732 | let pseudotag.children = [a:tag] |
1733 | 1733 |
|
1734 | 1734 | " get all the other (direct) children of the current pseudo-tag |
1735 | | - let ispseudochild = 'v:val.path == a:tag.path && v:val.scope == a:tag.scope' |
| 1735 | + let ispseudochild = 'v:val.path ==# a:tag.path && v:val.scope ==# a:tag.scope' |
1736 | 1736 | let pseudochildren = filter(copy(a:curtags), ispseudochild) |
1737 | 1737 | if !empty(pseudochildren) |
1738 | 1738 | call filter(a:curtags, '!(' . ispseudochild . ')') |
@@ -1819,27 +1819,27 @@ endfunction |
1819 | 1819 | function! s:CompareByKind(tag1, tag2) |
1820 | 1820 | let typeinfo = s:compare_typeinfo |
1821 | 1821 |
|
1822 | | - if typeinfo.kinddict[a:tag1.fields.kind] < |
| 1822 | + if typeinfo.kinddict[a:tag1.fields.kind] <# |
1823 | 1823 | \ typeinfo.kinddict[a:tag2.fields.kind] |
1824 | 1824 | return -1 |
1825 | | - elseif typeinfo.kinddict[a:tag1.fields.kind] > |
| 1825 | + elseif typeinfo.kinddict[a:tag1.fields.kind] ># |
1826 | 1826 | \ typeinfo.kinddict[a:tag2.fields.kind] |
1827 | 1827 | return 1 |
1828 | 1828 | else |
1829 | 1829 | " Ignore '~' prefix for C++ destructors to sort them directly under |
1830 | 1830 | " the constructors |
1831 | | - if a:tag1.name[0] == '~' |
| 1831 | + if a:tag1.name[0] ==# '~' |
1832 | 1832 | let name1 = a:tag1.name[1:] |
1833 | 1833 | else |
1834 | 1834 | let name1 = a:tag1.name |
1835 | 1835 | endif |
1836 | | - if a:tag2.name[0] == '~' |
| 1836 | + if a:tag2.name[0] ==# '~' |
1837 | 1837 | let name2 = a:tag2.name[1:] |
1838 | 1838 | else |
1839 | 1839 | let name2 = a:tag2.name |
1840 | 1840 | endif |
1841 | 1841 |
|
1842 | | - if name1 <= name2 |
| 1842 | + if name1 <=# name2 |
1843 | 1843 | return -1 |
1844 | 1844 | else |
1845 | 1845 | return 1 |
@@ -1902,7 +1902,7 @@ function! s:RenderContent(...) |
1902 | 1902 | endif |
1903 | 1903 |
|
1904 | 1904 | if !empty(s:known_files.getCurrent()) && |
1905 | | - \ fileinfo.fpath == s:known_files.getCurrent().fpath |
| 1905 | + \ fileinfo.fpath ==# s:known_files.getCurrent().fpath |
1906 | 1906 | " We're redisplaying the same file, so save the view |
1907 | 1907 | let saveline = line('.') |
1908 | 1908 | let savecol = col('.') |
@@ -1935,7 +1935,7 @@ function! s:RenderContent(...) |
1935 | 1935 | setlocal nomodifiable |
1936 | 1936 |
|
1937 | 1937 | if !empty(s:known_files.getCurrent()) && |
1938 | | - \ fileinfo.fpath == s:known_files.getCurrent().fpath |
| 1938 | + \ fileinfo.fpath ==# s:known_files.getCurrent().fpath |
1939 | 1939 | let scrolloff_save = &scrolloff |
1940 | 1940 | set scrolloff=0 |
1941 | 1941 |
|
|
0 commit comments