Skip to content

Commit

Permalink
Merge pull request #47 from prettier/issue/46-fixing-async-cmd-for-wi…
Browse files Browse the repository at this point in the history
…ndows

bugfix: Async command was not working for windows this patch will make sure it
  • Loading branch information
mitermayer authored Aug 24, 2017
2 parents fc799a7 + 72e81c6 commit e953503
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion autoload/prettier.vim
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,15 @@ function! s:Prettier_Exec_Sync(cmd, startSelection, endSelection) abort
endfunction

function! s:Prettier_Exec_Async(cmd, startSelection, endSelection) abort
let l:async_cmd = a:cmd

if has('win32') || has('win64')
let l:async_cmd = 'cmd.exe /c ' . a:cmd
endif

if s:prettier_job_running != 1
let s:prettier_job_running = 1
call job_start(a:cmd, {
call job_start(l:async_cmd, {
\ 'in_io': 'buffer',
\ 'in_top': a:startSelection,
\ 'in_bot': a:endSelection,
Expand Down

0 comments on commit e953503

Please sign in to comment.