Skip to content
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

use nvim cd to another cwd will cause an empty list #99

Open
obuhz opened this issue Dec 2, 2024 · 0 comments
Open

use nvim cd to another cwd will cause an empty list #99

obuhz opened this issue Dec 2, 2024 · 0 comments

Comments

@obuhz
Copy link

obuhz commented Dec 2, 2024

problem:
When use nvim to change cwd to a directory with arrow record, leader key will invoke am empty list.
for example:
In your home, type nvim, then type : cd .config/nvim, then press ; key. Empty list will appear.

fix:
The problem is in the ui.lua. Here is a patch to solve it.

diff --git a/lua/arrow/ui.lua b/lua/arrow/ui.lua
index 494c844..eaa3b30 100644
--- a/lua/arrow/ui.lua
+++ b/lua/arrow/ui.lua
@@ -411,7 +411,7 @@ function M.openMenu(bufnr)
 
        local call_buffer = bufnr or vim.api.nvim_get_current_buf()
 
-       if vim.g.arrow_filenames == 0 then
+       if #vim.g.arrow_filenames == 0 then
                persist.load_cache_file()
        end
 
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

1 participant