From df008cc68afc8d8ff8c97d565efd675e5693511a Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Tue, 16 Apr 2024 13:08:48 +0900 Subject: [PATCH] Fix print error --- autoload/dpp/util.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autoload/dpp/util.vim b/autoload/dpp/util.vim index 6043253..fc74120 100644 --- a/autoload/dpp/util.vim +++ b/autoload/dpp/util.vim @@ -2,7 +2,9 @@ const s:is_windows = has('win32') || has('win64') function dpp#util#_error(string, name = 'dpp') abort echohl Error - for line in a:string->string()->split("\n")->filter({ _, val -> val != ''}) + for line in + \ (a:string->type() ==# v:t_string ? a:string : a:string->string()) + \ ->split("\n")->filter({ _, val -> val != ''}) echomsg printf('[%s] %s', a:name, line) endfor echohl None