Skip to content

update_cwd not working as expected #673

Closed
@caenrique

Description

@caenrique

When using update_cwd = true I open a new tab and execute :tcd some/other/dir. This changes the root directory. Going back to the previous tab triggers the event DirChanged but the root of the tree doesn't update accordingly.

I looked into the code and found that the function M.change_dir(name) is the problem. it's not doing anything in the case that the variable event.changed_window is set, but why should this be the case?

the documentation for this variable:

DirChanged			After the |current-directory| was changed.
				Sets these |v:event| keys:
				    cwd:   current working directory
				    scope: "global", "tab", "window"
				    changed_window: v:true if we fired the event
				                    switching window (or tab)

I would expect that if DirChanged is triggered switching window or tab is because the user did lcd or tcd (which is my case)

Can this at least be configurable?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions