From 519b91c2ddb97fb0a0897abdd7e3c3e0410d8588 Mon Sep 17 00:00:00 2001 From: Guldoman Date: Tue, 15 Nov 2022 17:03:13 +0100 Subject: [PATCH] Pass the currently selected item to `CommandView` validation (#1203) --- data/core/commandview.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/core/commandview.lua b/data/core/commandview.lua index e0af6c21..1f388678 100644 --- a/data/core/commandview.lua +++ b/data/core/commandview.lua @@ -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)