Skip to content

Commit

Permalink
Fix print_error
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Apr 16, 2024
1 parent 7892b46 commit 74743f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion autoload/ddc/util.vim
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
function ddc#util#print_error(string, name = 'ddc') 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
Expand Down

0 comments on commit 74743f5

Please sign in to comment.