Skip to content

Commit

Permalink
fix(vim): avoid throw error with Vim prefix
Browse files Browse the repository at this point in the history
Vim throw error for custom error with Vim prefix
  • Loading branch information
chemzqm committed Sep 2, 2023
1 parent 44539bd commit 17fe9d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion autoload/coc/api.vim
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ function! s:funcs.command(command) abort
" get error from python script run.
if !empty(err)
unlet g:errmsg
throw err
throw 'Command error '.err
endif
endif
endfunction
Expand Down
4 changes: 2 additions & 2 deletions autoload/coc/ui.vim
Original file line number Diff line number Diff line change
Expand Up @@ -482,10 +482,10 @@ endfunction
function! coc#ui#safe_open(cmd, file) abort
let bufname = fnameescape(a:file)
try
execute a:cmd.' 'bufname
execute a:cmd.' '.bufname
catch /.*/
if bufname('%') != bufname
throw v:exception
throw 'Error on open '. v:exception
endif
endtry
endfunction
Expand Down

0 comments on commit 17fe9d3

Please sign in to comment.