Skip to content

CMake project cwd resets after changing Neovim working directory #401

@Petuha

Description

@Petuha

After calling :CMakeSelectCwd and pointing it to my project root, everything works fine. But if I then change Neovim's working directory with :cd (or another plugin that calls :cd internally), the cmake plugin's cwd follows along and all further interaction with it breaks - it can no longer find CMakeLists.txt in the originally selected directory.

Steps to reproduce:

  1. :CMakeSelectCwd -> /path/to/folder/containing/CMakeLists.txt
  2. :CMakeBuild - works fine
  3. :cd /some/other/dir
  4. :CMakeBuild - fails, plugin is now looking for CMakeLists.txt in /some/other/dir

Is this intended behavior? If so, is there any way to tell the plugin to keep its cwd fixed after I've explicitly set it with :CMakeSelectCwd, regardless of subsequent changes to Neovim's working directory?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions