fix: stabilize multi-account chat handling

This commit is contained in:
Mikhail Kilin
2026-05-17 04:06:19 +03:00
parent 1208aa5afb
commit 42884d174e
22 changed files with 471 additions and 203 deletions

View File

@@ -435,9 +435,9 @@ async fn test_ctrl_w_deletes_word_with_spaces() {
assert_eq!(app.cursor_position, 9);
}
/// Ctrl+A → курсор в начало в Insert mode
/// Home → курсор в начало в Insert mode
#[tokio::test]
async fn test_ctrl_a_moves_to_start_in_insert() {
async fn test_home_moves_to_start_in_insert() {
let mut app = TestAppBuilder::new()
.with_chats(vec![create_test_chat("Chat", 101)])
.selected_chat(101)
@@ -446,7 +446,7 @@ async fn test_ctrl_a_moves_to_start_in_insert() {
.build();
app.cursor_position = 11;
handle_main_input(&mut app, ctrl_key('a')).await;
handle_main_input(&mut app, key(KeyCode::Home)).await;
assert_eq!(app.cursor_position, 0);
}