junegunn / junegunn/fzf.vim

Current directory gets changed when running :FZF

Open
#460 3 comments 4 reactions 0 assignees View on GitHub
Dominant language
Vim Script
Stars
10.3k
Forks
608
Avg merge
5d 8h
Merged PRs (30d)
2

Description

- Category
- [ ] Question
- [x] Bug
- [ ] Suggestion
- OS
- [x] Linux
- [ ] macOS
- [ ] Windows
- [ ] Etc.
- Vim
- [ ] Vim
- [x] Neovim

Hello,

I've seen several issues about the working directory getting changed in Neovim, that were fixed by https://github.com/junegunn/fzf/commit/cd59e5d07b3a69a75f7c0d02efd66b6f04bb13a1#diff-24d9d57e35df5afce7890f2400917919

However, when I run `:FZF`, select two entries, and open them in multiple tabs, only the first file gets opened, the other is just an empty buffer.

This is because the current directory got modified, but was not restored as `:pwd` showed me.

`set autochdir?` returns `noautochdir`. I did not see any options in my `init.vim` that were relevant to this issue.

I also use `FZF_DEFAULT_COMMAND='ag -g ""' in my zshrc

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.