`cargo-limit` invoke `CARGO_OPEN` twice per run
casey opened this issue · 3 comments
casey commented
I believe that cargo-limit
is invoking CARGO_OPEN
twice per run.
I'm working on a custom-function to populate the quickfix list:
function! g:CargoLimitOpen(result)
cgetexpr []
let files = a:result['files']
for file in files
caddexpr file['path'] . ':' . file['line'] . ':' . file['column']
endfor
endfunction
However, this function is getting called twice every time I run cargo lcheck
, first with:
{'files': [{'level': 'error', 'path': '/Users/rodarmor/src/agora/src/main.rs', 'column': 1, 'line': 5, 'message'
: 'expected one of `!` or `::`, found `#`'}], 'workspace_root': '/Users/rodarmor/src/agora'}
And then with an empty object:
{'files': [], 'workspace_root': '/Users/rodarmor/src/agora'}
Since my a:CargoLimitOpen
this has the effect of populating and then immediately clearing the quickfix list.
alopatindev commented
Thanks for reporting this! I pushed a partial fix, so at least in most cases this shouldn't happen anymore.
alopatindev commented
Should work correctly now.
alopatindev commented
I actually broke #13 with initial partial fix. Reverted it, should be working well now.