Skip to content

Conversation

@AgatZan
Copy link

@AgatZan AgatZan commented Dec 9, 2025

Why

Everywhere else in the entire module, MiniPick.is_picker_active is checked before the assertion section. For example:

MiniPick.set_picker_items_from_cli = function(command, opts)
  if not MiniPick.is_picker_active() then return end
  local is_valid_command = H.is_array_of(command, 'string') and #command >= 1
  if not is_valid_command then H.error('`command` should be an array of strings.') end

The alternative behavior is not described in the documentation for the method.

`error` is `items` should be and array
`picker is inactive` is `not MiniPick.is_picker_active()`
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

Successfully merging this pull request may close these issues.

1 participant