Pass the currently selected item to `CommandView` validation (#1203)
This commit is contained in:
parent
38a8549e71
commit
519b91c2dd
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue