From 1cd8517344c0d99ca6fb3246c70f78d271993cf6 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 10 May 2018 16:03:13 +0200 Subject: man.vim: s:get_path(): trim newline in all cases ref #8372 --- runtime/autoload/man.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime') 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)' -- cgit