otavioschwanck / arrow.nvim

Bookmark your files, separated by project, and quickly navigate through them.
Other
482 stars 23 forks source link

Bug: `persist.next` fails when not in root #33

Closed aarondill closed 5 months ago

aarondill commented 6 months ago

persist.next opens the wrong file when used outside of the root (note: the UI doesn't have this issue)

Repo:

> mkdir repro
> cd repro
> git init # Using root_key = "git_root"!
> mkdir dir
> echo "dir/file" >| "dir/file"
> nvim
  1. :lua require("arrow.persist").clear()
  2. :lua require("arrow.persist").save("dir/file")
  3. :cd dir/ -- We're no longer under the root!
  4. Press leader_key then 1 - it works!
  5. :lua require('arrow.persist').next() -- it opens dir/dir/file
otavioschwanck commented 6 months ago

I will look to it later in the week, thanks for bringing it

otavioschwanck commented 5 months ago

@aarondill could you verify if that fixes? https://github.com/otavioschwanck/arrow.nvim/commit/f4aa623528efa906f5e7f68a28d93a82132e331b

aarondill commented 5 months ago

Please disregard my previous comments, it was a configuration issue.

This does seem to fix the issue! :tada:

aarondill commented 5 months ago

@otavioschwanck I can't resolve this from my phone, but please feel free to mark this issue as resolved