-
Notifications
You must be signed in to change notification settings - Fork 178
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
Bug: file_tabedit opens file in the wrong directory #1854
Comments
Your analysis is correct, this is due to #1785. @phanen, @Yarovski, any ideas before I revert this change for @Yarovski, maybe you can have your own version of fzf-lua/lua/fzf-lua/actions.lua Lines 274 to 275 in 9b84b53
|
No objection. But I cannot reproduce the issue as the description. However I find a new issue: change directory after launch a picker (without a So I can reproduce in this way
But this is irrelevant to 9dd089f |
Maybe because you’re using hide profile and the edit “resumes” from the previous tab? Does this still happen if you relaunch the files picker? |
It work fine. Technically I can still |
RTFM Checklist
man fzf
/ I am well versed in shell fzfOperating system
Linux
Shell
zsh
Neovim version (
nvim --version
)v0.11.0-dev-1649+gc47496791a
Fzf version (
fzf --version
)0.60.2 (c0d407f7)
Output of
:lua print(os.getenv('FZF_DEFAULT_OPTS'))
nil
Is the problem reproducible with
mini.sh
?mini.sh
mini.sh
mini.sh
(not relevant, requires LSP, Windows, etc)Fzf-lua configuration
Describe the bug / steps to reproduce
Sometime in the last few weeks,
actions.file_tabedit
has stopped working. Now when I hit ctrl-tab, it opens a new tab for the file but at the wrong directory.e.g. If I'm editing a file, I can see with
echo getcwd()
that I'm at/path/to/base/path/to/project
. Say I attempt to openinclude/file.hpp
with ctrl-t (file_tabedit
), it SHOULD open:But instead it opens:
which doesn't exist.
file_split
andfile_vsplit
and work as expected, it's onlyfile_tabedit
that stopped working.Steps to reproduce
/path/to/base
/path/to/base/path/to/project/include/file.hpp
. Usetcd
to set your current directory to to/path/to/base/path/to/project
. - I thinktcd
is correct, in my case I use nvim-rooter to handle this, as in this example/path/to/base/path/to/project
would be a git repofile_tabedit
actionsSpeculation
I assume it's related to 9dd089f changing from
tab split
totabnew
. When I jump back to 562593a the function works as expected.I use nvim-rooter as well to set my path as my work is spread through many different git repos. Perhaps it's only setting the tab's cwd, and
tabnew
creates a tab with the original cwd? Just speculating.The text was updated successfully, but these errors were encountered: