Closed ibhagwan closed 5 months ago
That's great news! I was going to report this, but I noticed the behavior mid-week and just needed to get a fix in ASAP. Glad it was fixed upstream!
That's great news! I was going to report this, but I noticed the behavior mid-week and just needed to get a fix in ASAP. Glad it was fixed upstream!
Ty @stevearc!
Hi @stevearc,
Context: https://github.com/ibhagwan/fzf-lua/issues/1014
After the above report I decided to test fzf-lua with dressing, to my surprise I saw the latest 2 commits (namely https://github.com/stevearc/dressing.nvim/commit/9f9b77315d559fa09850eb3db621ba6fce3d3d32) and this comment:
This made no sense as I had written the code in the past in such a way that should call
on_choice
withnil
when no item is selected.Turns out, some time ago I added "dummy" actions (keybinds) for
ctrl-c/esc
(for better resume support) which in turn affected the code route I had setup before to callon_choice(nil, nil)
when no item was selected. While I appreiate the innovative solution your commits :smile: I think it's better to also solve the original bug (on_choice
must be called according to the docs):Fixed in https://github.com/ibhagwan/fzf-lua/commit/5474df3a722b0efbeb9f47d0b2fdbce7d2ff258e, the new code flow (I can probablly eliminate the
if not selected
route, left for posterity):