aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/autoload/man.vim6
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/autoload/man.vim b/runtime/autoload/man.vim
index f4c8194b65..41c2f5a405 100644
--- a/runtime/autoload/man.vim
+++ b/runtime/autoload/man.vim
@@ -392,8 +392,8 @@ function! man#init_pager() abort
keepjumps 1
endif
lua require("man").highlight_man_page()
- " This is not perfect. See `man glDrawArraysInstanced`. Since the title is
- " all caps it is impossible to tell what the original capitilization was.
+ " Guess the ref from the heading (which is usually uppercase, so we cannot
+ " know the correct casing, cf. `man glDrawArraysInstanced`).
let ref = substitute(matchstr(getline(1), '^[^)]\+)'), ' ', '_', 'g')
try
let b:man_sect = man#extract_sect_and_name_ref(ref)[0]
@@ -401,7 +401,7 @@ function! man#init_pager() abort
let b:man_sect = ''
endtry
if -1 == match(bufname('%'), 'man:\/\/') " Avoid duplicate buffers, E95.
- execute 'silent file man://'.fnameescape(ref)
+ execute 'silent file man://'.tolower(fnameescape(ref))
endif
endfunction