diff options
Diffstat (limited to 'src/ui/views/tui_textfield.rs')
-rw-r--r-- | src/ui/views/tui_textfield.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/ui/views/tui_textfield.rs b/src/ui/views/tui_textfield.rs index b2372d4..997e664 100644 --- a/src/ui/views/tui_textfield.rs +++ b/src/ui/views/tui_textfield.rs @@ -172,11 +172,7 @@ impl<'a> TuiTextField<'a> { Key::Home => line_buffer.move_home(), Key::End => line_buffer.move_end(), Key::Up => { - curr_history_index = if curr_history_index > 0 { - curr_history_index - 1 - } else { - 0 - }; + curr_history_index = curr_history_index.saturating_sub(1); line_buffer.move_home(); line_buffer.kill_line(); if let Some(s) = context |