From 0568441e4628510f1bb3bb1e98ec781ab5a56d24 Mon Sep 17 00:00:00 2001 From: filipriec Date: Sun, 30 Mar 2025 18:29:33 +0200 Subject: [PATCH] minor ui stuff --- client/src/tui/functions/login.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/tui/functions/login.rs b/client/src/tui/functions/login.rs index 9d636a5..f447a96 100644 --- a/client/src/tui/functions/login.rs +++ b/client/src/tui/functions/login.rs @@ -21,7 +21,7 @@ pub async fn handle_action( auth_state.current_field = 1; } - // Update cursor position + // Update cursor position only when in a field if !auth_state.return_selected { let current_input = auth_state.get_current_input(); let max_cursor_pos = current_input.len(); @@ -39,11 +39,12 @@ pub async fn handle_action( // Username -> Password auth_state.current_field = 1; } else if auth_state.current_field == 1 { - // Password -> Buttons (Login button) + // Password -> Login button auth_state.return_selected = false; + // No cursor update needed when on buttons } - // Update cursor position when in a field + // Update cursor position only when in a field if !auth_state.return_selected { let current_input = auth_state.get_current_input(); let max_cursor_pos = current_input.len(); @@ -55,4 +56,3 @@ pub async fn handle_action( _ => Err("Unknown login action".into()) } } -