Pass the currently selected item to `CommandView` validation (#1203)

This commit is contained in:
Guldoman 2022-11-15 17:03:13 +01:00 committed by GitHub
parent 38a8549e71
commit 519b91c2dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -159,7 +159,7 @@ end
function CommandView:submit()
local suggestion = self.suggestions[self.suggestion_idx]
local text = self:get_text()
if self.state.validate(text) then
if self.state.validate(text, suggestion) then
local submit = self.state.submit
self:exit(true)
submit(text, suggestion)