Permalink
Browse files

Fix error when g:opengoogletranslate#openbrowsercmd is empty.

error:
  Error detected while processing function opengoogletranslate#command#command[12]
  ..opengoogletranslate#open:
  line    2:
  E688: More targets than List items
  • Loading branch information...
1 parent 892242d commit c80d857bacef2d86e24ec63b36c1ab0af7bb5b0d @Jagua Jagua committed Nov 28, 2016
Showing with 1 addition and 1 deletion.
  1. +1 −1 autoload/opengoogletranslate.vim
@@ -8,7 +8,7 @@ let g:opengoogletranslate#openbrowsercmd = get(g:, 'opengoogletranslate#openbrow
" TODO: support removing comment prefix in given input?
function! opengoogletranslate#open(...) abort
let url = call('opengoogletranslate#url', a:000)
- let [cmd; args] = split(g:opengoogletranslate#openbrowsercmd, ' ')
+ let [cmd; args] = split(g:opengoogletranslate#openbrowsercmd, ' ', 1)
if executable(cmd) ==# 1
call job_start([cmd] + args + [url])
return

0 comments on commit c80d857

Please sign in to comment.