Skip to content

NvimTreeFindFile does not put the cursor on the file in the tree #988

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

Closed
hoopes opened this issue Feb 15, 2022 · 2 comments
Closed

NvimTreeFindFile does not put the cursor on the file in the tree #988

hoopes opened this issue Feb 15, 2022 · 2 comments

Comments

@hoopes
Copy link

hoopes commented Feb 15, 2022

OS

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.3 LTS"

Neovim version

$ nvim --version
NVIM v0.7.0-dev
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -g -O2 -fdebug-prefix-map=/build/neovim-JJBqbi/neovim-0.7.0~ubuntu1+git202201260047-ecec95712-dd05b3569=. -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/build/neovim-JJBqbi/neovim-0.7.0~ubuntu1+git202201260047-ecec95712-dd05b3569/build/config -I/build/neovim-JJBqbi/neovim-0.7.0~ubuntu1+git202201260047-ecec95712-dd05b3569/src -I/build/neovim-JJBqbi/neovim-0.7.0~ubuntu1+git202201260047-ecec95712-dd05b3569/.deps/usr/include -I/usr/include -I/build/neovim-JJBqbi/neovim-0.7.0~ubuntu1+git202201260047-ecec95712-dd05b3569/build/src/nvim/auto -I/build/neovim-JJBqbi/neovim-0.7.0~ubuntu1+git202201260047-ecec95712-dd05b3569/build/include
Compiled by buildd@lcy02-amd64-027

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

Nvim-tree version

~/.local/share/nvim/site/pack/packer/start/nvim-tree.lua $ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
~/.local/share/nvim/site/pack/packer/start/nvim-tree.lua $ git show --format="%h" --no-patch
0c43c80

Describe the bug

When running :NvimTreeFindFile, the cursor stays in the file. Previously, it would jump to the tree at the location of the file.

To Reproduce
Run :NvimTreeFindFile

Expected behavior
I expect the cursor to jump to the first character of the file that has been found in the tree.

Thanks! Love this plugin!

@hoopes
Copy link
Author

hoopes commented Feb 16, 2022

Hi, I'm sorry, this does not appear to fix it (at least, for me) See the gif below for what I'm seeing. Sorry if the gif is ugly, it's my first time making one. You can see the cursor still in the file, and not on the tree after running :NvimTreeFindFile.

I appear to be after the commit referenced above.

(aws) hoopes:~/.local/share/nvim/site/pack/packer/start/nvim-tree.lua $ pwd
/home/hoopes/.local/share/nvim/site/pack/packer/start/nvim-tree.lua
(aws) hoopes:~/.local/share/nvim/site/pack/packer/start/nvim-tree.lua $ git log --oneline -n 3
5a6fd49 (HEAD -> master, origin/master, origin/HEAD) fix: check bufnr is valid in diagnostics
64c098d fix: schedule find-file, not toggle
0c43c80 fix lint issue

issue-988

@kyazdani42
Copy link
Member

should be fixed in latest master

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

No branches or pull requests

2 participants