Closed zhanglin2018 closed 1 year ago
Can you clarify what you mean by directory structure? Can you provide a screenshot or video showing the problem?
First,I have open a working directory and open some cpp file into buffers. when i use goto-preview to find a definition which the file is not in the currect working directory. As the result, the working directory will be changed. Finally, I close the goto-preview flowting window, the working directory has been changed, and only in the parent directy of the focused buffer.
First,I have open a working directory and open some cpp file into buffers. when i use goto-preview to find a definition which the file is not in the currect working directory. As the result, the working directory will be changed. Finally, I close the goto-preview flowting window, the working directory has been changed, and only in the parent directy of the focused buffer.
Was this issue resolved? Was it a non-issue?
not resolved: ex: I am in the A/B/C/demo.cpp, the demo.cpp has a reference call to D/called.cpp. use the goto-preview, the directory will be changed to the D/call.cpp. when close the goto-preview, the directory will be changed to the C/demo.cpp, that's a trouble.
every time, I need to open the directory to A/B/C/demo.cpp
I see. This has nothing to do with goto-preview. You probably have some other plugin changing the your cwd
to whatever the directory of the newly opened buffer is. Goto preview merely navigates you to the new buffer, it does not touch your cwd
.
I got it. Thanks for your help. and i find the root cause: the nvim-tree.lua has option in the setup block, like updata_focused_file = { enable = true, update_cwd = true, ignore_list = {}, } After set the "update_cwd" to false, this issue is gone.
Is your feature request related to a problem? Please describe. First i am in the first directory structure and then use the goto-preview plugin to only show the preview buffer. And the I close the preview buffer, unfortunatelly, the last directory structure has changed and every time I must open the directory again and again.
Describe the solution you'd like keep the last directory structure after close the preview window?
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.