aboutsummaryrefslogtreecommitdiff
path: root/runtime/autoload/man.vim
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/autoload/man.vim')
-rw-r--r--runtime/autoload/man.vim23
1 files changed, 15 insertions, 8 deletions
diff --git a/runtime/autoload/man.vim b/runtime/autoload/man.vim
index ec48d96dd6..8825719ec7 100644
--- a/runtime/autoload/man.vim
+++ b/runtime/autoload/man.vim
@@ -264,14 +264,6 @@ function! s:push_tag() abort
\ }]
endfunction
-function! man#pop_tag() abort
- if !empty(s:tag_stack)
- let tag = remove(s:tag_stack, -1)
- execute 'silent' tag['buf'].'buffer'
- call cursor(tag['lnum'], tag['col'])
- endif
-endfunction
-
" extracts the name and sect out of 'path/name.sect'
function! s:extract_sect_and_name_path(path) abort
let tail = fnamemodify(a:path, ':t')
@@ -410,4 +402,19 @@ function! man#init_pager() abort
endif
endfunction
+function! man#goto_tag(pattern, flags, info) abort
+ " currently no support for section completion
+ let sect = ""
+
+ let candidates = s:get_paths(sect, a:pattern)
+
+ return map(candidates, {
+ \ _, path -> {
+ \ 'name': s:extract_sect_and_name_path(path)[1],
+ \ 'filename': 'man://' . path,
+ \ 'cmd': '1'
+ \ }
+ \ })
+endfunction
+
call s:init()