Skip to content

Fix focusing directories with a trailing slash in their path doesn't work #1501

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 14, 2022
Merged

Fix focusing directories with a trailing slash in their path doesn't work #1501

merged 1 commit into from
Aug 14, 2022

Conversation

regexPattern
Copy link
Contributor

The issue here was that the directory path generated when a new directory was created through the fs.create-file function was not formatted correctly as utils.focus_file required, so it wasn't focused after it's creation. The solution was to remove the trailing slash on this path, which was solved using the utils.path_remove_trailing utility when attempting to focus the newly created dir in the above mentioned functions.

Solves #1500

@regexPattern
Copy link
Contributor Author

The commit's message probably needs a rebase, I didn't know how to format it.

Copy link
Member

@alex-courtis alex-courtis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested OK nvim v0.7.2

@alex-courtis alex-courtis merged commit b314b3a into nvim-tree:master Aug 14, 2022
Almo7aya pushed a commit to Almo7aya/nvim-tree.lua that referenced this pull request Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants