diff options
| author | mitermayer <mitermayer.reis@gmail.com> | 2018-05-04 12:09:01 -0700 |
|---|---|---|
| committer | mitermayer <mitermayer.reis@gmail.com> | 2018-05-04 12:09:01 -0700 |
| commit | e78c17a9fa8aab9067a44f9836d46fa9dc2d5914 (patch) | |
| tree | f75b59b3f612ec837ffb6eadb5a586891a3681e7 /autoload/prettier/bridge/parser.vim | |
| parent | 04f122063407c829b8762a1425fe55a0bb2f686b (diff) | |
| download | vim-prettier-e78c17a9fa8aab9067a44f9836d46fa9dc2d5914.tar.xz | |
Refactoring out sync jobs and quickfix module
Diffstat (limited to 'autoload/prettier/bridge/parser.vim')
| -rw-r--r-- | autoload/prettier/bridge/parser.vim | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/autoload/prettier/bridge/parser.vim b/autoload/prettier/bridge/parser.vim index eb23210..51c4069 100644 --- a/autoload/prettier/bridge/parser.vim +++ b/autoload/prettier/bridge/parser.vim @@ -1,4 +1,7 @@ -function! prettier#bridge#parser#onError(out) abort +" TODO +" this function should just returns the parsed errors list instead +" of opening the quickfix +function! prettier#bridge#parser#onError(out, autoFocus) abort let l:errors = [] for l:line in a:out @@ -16,13 +19,6 @@ function! prettier#bridge#parser#onError(out) abort endfor if len(l:errors) - let l:winnr = winnr() - call setqflist(l:errors, 'r') - botright copen - if !g:prettier#quickfix_auto_focus - " Return the cursor back to the main buffer. - exe l:winnr . 'wincmd w' - endif - return 1 + call prettier#utils#quickfix#open(l:errors, a:autoFocus) endif endfunction |
