From 3d444b5b4f636408c239a59adb88ee13a56486e0 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Mon, 15 Mar 2021 23:41:40 -0400 Subject: [PATCH] Don't show v:null in preview window --- autoload/rhubarb.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/rhubarb.vim b/autoload/rhubarb.vim index 58be30d..2c01d12 100644 --- a/autoload/rhubarb.vim +++ b/autoload/rhubarb.vim @@ -227,7 +227,7 @@ function! rhubarb#Complete(findstart, base) abort else let issues = get(response, 'items', []) endif - return map(issues, '{"word": prefix.v:val.number, "abbr": "#".v:val.number, "menu": v:val.title, "info": substitute(v:val.body,"\\r","","g")}') + return map(issues, '{"word": prefix.v:val.number, "abbr": "#".v:val.number, "menu": v:val.title, "info": substitute(empty(v:val.body) ? "\n" : v:val.body,"\\r","","g")}') endif catch /^rhubarb:.*is not a GitHub repository/ return []