-
-
Notifications
You must be signed in to change notification settings - Fork 620
Cursor Jumps to present working directory after New File Creation #1615
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
Comments
I think there is a defer_fn in this area which might cause that if reload is slow after adding a file. |
@alex-courtis Sorry for being late . Please have a look . If i am trying it from the |
Aha! It's the wrapped You're right about the defer_fn Always calling reload then immediately focusing "resolves" the issue. Perhaps a synchronous call to refresh the directory followed by synchronous focus. Thoughts @kyazdani42 ? |
i dont mind a hack for this, current solution is already a hack :) |
…ires confirmation (nvim-tree#1622) * fix(nvim-tree#1615): focus created file when command line prompt requires confirmation * fix(nvim-tree#1615): focus created file when command line prompt requires confirmation
Description
The cursor jumps to the present working directory (
pwd
) after creating a file in any of the directories .Neovim version
Operating system and version
ProductName: Mac OS X 10.15.7 ,BuildVersion: 19H2026
nvim-tree version
3676e0b
Minimal config
Steps to reproduce
a
enter
Expected behavior
The cursor should remain in the directory on which the file is created .
Actual behavior
Cursor jumps to the parent directory and have to use motion keys to open the newly created file
The text was updated successfully, but these errors were encountered: