diff --git a/src/app/panel.rs b/src/app/panel.rs index e7254858..6f54476e 100644 --- a/src/app/panel.rs +++ b/src/app/panel.rs @@ -35,6 +35,7 @@ pub struct Panel { } impl Panel { + pub fn new( id: PanelId, state: Box, @@ -58,10 +59,7 @@ impl Panel { pub fn set_error(&mut self, text: String) { self.status = Status::from_error(text); } - pub fn set_message>( - &mut self, - md: S, - ) { + pub fn set_message>(&mut self, md: S) { self.status = Status::from_message(md.into()); } diff --git a/src/command/panel_input.rs b/src/command/panel_input.rs index b0f4d1d2..855a1823 100644 --- a/src/command/panel_input.rs +++ b/src/command/panel_input.rs @@ -31,6 +31,7 @@ pub struct PanelInput { } impl PanelInput { + pub fn new(area: Area) -> Self { Self { input_field: InputField::new(area), @@ -379,9 +380,9 @@ impl PanelInput { let verb = if self.is_key_allowed_for_verb(key, mode) { self.find_key_verb( - key, - con, - sel_info, + key, + con, + sel_info, panel_state_type, ) } else {