Closed JafarAbdi closed 2 years ago
This PR should fix a bug where filtering the options is returning the wrong index (text and index doesn't correspond to each other), here's a simple reproducible example
local options = { "AD", "AB", "AC", "CC", "BB" } vim.ui.select(options, { prompt = "Select Command: " }, function(command, index) print(string.format("command: %s - index: %s - command_index: %s", command, index, options[index])) end)
These two gifs show the bug & fix
Thanks :) good find!
This PR should fix a bug where filtering the options is returning the wrong index (text and index doesn't correspond to each other), here's a simple reproducible example
These two gifs show the bug & fix