diff options
| author | mitermayer <mitermayer.reis@gmail.com> | 2018-06-22 11:35:39 -0700 |
|---|---|---|
| committer | mitermayer <mitermayer.reis@gmail.com> | 2019-08-25 21:13:01 -0700 |
| commit | 98b6fb2a77670bfd3f8fce627f5e5c1935cb82ad (patch) | |
| tree | 647644a60215212aaf71579001e1f8d4286502ca /autoload/prettier/job/async/vim.vim | |
| parent | 1d045d3c2ea7466d523b1bad64992d081d6de088 (diff) | |
| download | vim-prettier-98b6fb2a77670bfd3f8fce627f5e5c1935cb82ad.tar.xz | |
Fixing job runner lock flag
- Making sure we do not try to format a file again until execution is
finally finished
Diffstat (limited to 'autoload/prettier/job/async/vim.vim')
| -rw-r--r-- | autoload/prettier/job/async/vim.vim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/autoload/prettier/job/async/vim.vim b/autoload/prettier/job/async/vim.vim index d84d406..ab0fbef 100644 --- a/autoload/prettier/job/async/vim.vim +++ b/autoload/prettier/job/async/vim.vim @@ -23,8 +23,6 @@ function! s:onError(msg) abort endfunction function! s:onClose(channel, startSelection, endSelection, bufferName) abort - let s:prettier_job_running = 0 - let l:out = [] let l:currentBufferName = bufname('%') let l:isInsideAnotherBuffer = a:bufferName != l:currentBufferName ? 1 : 0 @@ -38,6 +36,7 @@ function! s:onClose(channel, startSelection, endSelection, bufferName) abort " nothing to update if (prettier#utils#buffer#willUpdatedLinesChangeBuffer(l:out, a:startSelection, a:endSelection) == 0) + let s:prettier_job_running = 0 return endif @@ -63,4 +62,5 @@ function! s:onClose(channel, startSelection, endSelection, bufferName) abort else call prettier#utils#buffer#replaceAndSave(l:out, a:startSelection, a:endSelection) endif + let s:prettier_job_running = 0 endfunction |
