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 5043448 commit df008cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion autoload/dpp/util.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit df008cc

Please sign in to comment.