From 49983a2270b1b98863608031406831bf22caea69 Mon Sep 17 00:00:00 2001 From: Anmol Sethi Date: Mon, 26 Dec 2016 21:01:37 -0500 Subject: [PATCH] man.vim: properly handle manpage names with spaces --- runtime/autoload/man.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/autoload/man.vim b/runtime/autoload/man.vim index 8ac8069730..320dd84263 100644 --- a/runtime/autoload/man.vim +++ b/runtime/autoload/man.vim @@ -279,7 +279,7 @@ function! man#init_pager() abort endif " This is not perfect. See `man glDrawArraysInstanced`. Since the title is " all caps it is impossible to tell what the original capitilization was. - let ref = tolower(matchstr(getline(1), '^\S\+')) + let ref = substitute(matchstr(getline(1), '^[^)]\+)'), ' ', '_', 'g') try let b:man_sect = man#extract_sect_and_name_ref(ref)[0] catch