Fix error on item select: Missing length argument

Addresses the following error resulting from not passing `length` param on line 170:
```
E5108: Error executing lua: ...kaze/.local/share/nvim/lazy/harpoon/lua/harpoon/list.lua:242: 'for' limit must be a number
stack traceback:
        ...kaze/.local/share/nvim/lazy/harpoon/lua/harpoon/list.lua:242: in function 'resolve_displayed'
        ...makaze/.local/share/nvim/lazy/harpoon/lua/harpoon/ui.lua:170: in function 'select_menu_item'
        ...ze/.local/share/nvim/lazy/harpoon/lua/harpoon/buffer.lua:21: in function 'run_select_command'
        ...ze/.local/share/nvim/lazy/harpoon/lua/harpoon/buffer.lua:61: in function <...ze/.local/share/nvim/lazy/harpoon/lua/harpoon/buffer.lua:60>
```
This commit is contained in:
Christopher Lane 2024-04-02 21:03:14 -04:00 committed by GitHub
parent 4ad05be8fe
commit e76cb03c42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -167,7 +167,8 @@ function HarpoonUI:select_menu_item(options)
-- must first save any updates potentially made to the list before -- must first save any updates potentially made to the list before
-- navigating -- navigating
local list = Buffer.get_contents(self.bufnr) local list = Buffer.get_contents(self.bufnr)
self.active_list:resolve_displayed(list) local length = #list
self.active_list:resolve_displayed(list, length)
Logger:log( Logger:log(
"ui#select_menu_item selecting item", "ui#select_menu_item selecting item",