Use the working folder of the search to used it to open the result file.#345
Use the working folder of the search to used it to open the result file.#345vds2212 wants to merge 2 commits intodyng:masterfrom
Conversation
…used when the query ran
|
I think you should use |
|
It is indeed a solution but when your project is in a deep file structure the output of CtrlSF is clutter with the path prefix that add no value to the user. I believe the pull request bring something to some users (;-)) |
| " BuildCommand() | ||
| " | ||
| func! s:BuildCommand(args, for_shell) abort | ||
| let g:ctrlsf_pwd = getcwd() |
There was a problem hiding this comment.
Avoid using global variables as they're typically reserved for options. Instead, define it as s:current_pwd (similar to s:current_mode), and add a new public method ctrlsf#GetFilePath(path).
| endif | ||
| endif | ||
|
|
||
| let file_path = '' |
There was a problem hiding this comment.
Have you verified that ctrlsf#edit#Save still works correctly when the CWD changes? I suspect there might be issues with it.
There was a problem hiding this comment.
Thanks for your review.
I'll do more tests and I'll come back to you.
This pull request intent to solve issue #344:
Fail to open the file of the search result when the working directory change