Giter Club home page Giter Club logo

Comments (7)

rmagatti avatar rmagatti commented on September 21, 2024

Can you clarify what you mean by directory structure? Can you provide a screenshot or video showing the problem?

from goto-preview.

zhanglin2018 avatar zhanglin2018 commented on September 21, 2024

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.

from goto-preview.

zhanglin2018 avatar zhanglin2018 commented on September 21, 2024

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.

from goto-preview.

rmagatti avatar rmagatti commented on September 21, 2024

Was this issue resolved? Was it a non-issue?

from goto-preview.

zhanglin2018 avatar zhanglin2018 commented on September 21, 2024

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

from goto-preview.

rmagatti avatar rmagatti commented on September 21, 2024

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.

from goto-preview.

zhanglin2018 avatar zhanglin2018 commented on September 21, 2024

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.

from goto-preview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.