skywind3000 / asyncrun.vim

:rocket: Run Async Shell Commands in Vim 8.0 / NeoVim and Output to the Quickfix Window !!
https://www.vim.org/scripts/script.php?script_id=5431
MIT License
1.84k stars 109 forks source link

Set cwd before setting qf list in AsyncRun_Job_Update. #238

Closed ipod825 closed 2 years ago

ipod825 commented 2 years ago

Since each setqflist call decides the file path according to current value of getcwd(). We should set cwd every time we call setqflist.

skywind3000 commented 2 years ago

thanks, but you have added the s:chdir code in the wrong place and haven't consider the situation when -cwd=xxx is not present.

I took your idea and implemented it in my way:

the new feature can be enabled by:

let g:asyncrun_pathfix = 1

Feed me back if you encounter same problem.

skywind3000 commented 2 years ago

btw: not sure that frequently changing working directory is a good idea, so it is not enabled by default.

I would like to prevent relative paths in the qf window by making gcc output the absolute path.