=== modified file 'autoload/info.vim' --- autoload/info.vim 2013-11-15 10:59:28 +0000 +++ autoload/info.vim 2013-11-14 20:24:54 +0000 @@ -1,7 +1,6 @@ let s:heading_pre_regex = '^\n\d\+\(\.\d\+\)* ' let s:heading_post_regex = '\n\(\*\{3,}\|=\{3,}\|-\{3,}\|\.\{3,}\)$' let s:heading_regex = s:heading_pre_regex.'.*'.s:heading_post_regex -let s:navigation_regex = '^\?\n\zsFile: [^,]\+, Node: ' let s:line_ref_regex = '^\* .*::' " let s:inline_ref_regex = '\*note\( \|\n\)\(.\+\n\)*.*::' @@ -18,21 +17,13 @@ endfunction function! info#GoToRef(name) - let l:name = escape(a:name, '$.*') - " echom "'".l:name."'" - let l:pat = s:navigation_regex . l:name . ', ' - let l:line = search(l:pat, 'w') - if(l:line) - exe l:line - norm! zt - return - endif - let l:pat = s:heading_pre_regex . l:name . '.*' . s:heading_post_regex - let l:line = search(l:pat, 'w') - if(l:line) - exe l:line-1 - norm! zt - return + let l:pat = escape(a:name, '$.*') + echom "'".l:pat."'" + let l:pat = s:heading_pre_regex . l:pat . '.*' . s:heading_post_regex + let l:line = search(l:pat, 'w') + if(l:line) + exe l:line+1 + norm! zt endif endfunction @@ -43,7 +34,7 @@ else let l:endpos = searchpos('::', 'cn', line('.')+1) let l:startpos = searchpos('\*note', 'cnb', line('.')-1) - " echom '*note '.string([l:startpos, l:endpos]) + echom '*note '.string([l:startpos, l:endpos]) if(l:endpos == [0, 0] || l:startpos == [0, 0]) return endif