aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/autoload/man.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/autoload/man.vim b/runtime/autoload/man.vim
index cf657f8b37..f21e2ee4f3 100644
--- a/runtime/autoload/man.vim
+++ b/runtime/autoload/man.vim
@@ -215,7 +215,7 @@ function! s:get_path(sect, name) abort
if empty(a:sect)
" Some man implementations (OpenBSD) return all available paths from the
" search command, so we get() the first one. #8341
- return get(split(s:system(['man', s:find_arg, a:name])), 0, '')
+ return substitute(get(split(s:system(['man', s:find_arg, a:name])), 0, ''), '\n\+$', '', '')
endif
" '-s' flag handles:
" - tokens like 'printf(echo)'