Skip to content

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

@obuhz

Description

@obuhz

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
 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions