fix: chat input crashing when moving the cursor (#33)

Reviewed-on: #33
This commit was merged in pull request #33.
This commit is contained in:
2026-06-03 13:18:03 +00:00
parent 5d4c8634ef
commit c78e0a5163
42 changed files with 7175 additions and 1593 deletions

View File

@@ -13,7 +13,7 @@ use smol::Timer;
use theme::ActiveTheme;
use crate::actions::{Cancel, Confirm, SelectDown, SelectUp};
use crate::input::{InputEvent, InputState, TextInput};
use crate::input::{Input, InputEvent, InputState};
use crate::list::ListDelegate;
use crate::list::cache::{MeasuredEntrySize, RowEntry, RowsCache};
use crate::scroll::{Scrollbar, ScrollbarHandle};
@@ -288,7 +288,7 @@ where
});
});
}
InputEvent::PressEnter { secondary } => self.on_action_confirm(
InputEvent::PressEnter { secondary, .. } => self.on_action_confirm(
&Confirm {
secondary: *secondary,
},
@@ -632,10 +632,10 @@ where
.border_b_1()
.border_color(cx.theme().border)
.child(
TextInput::new(&input)
Input::new(&input)
.with_size(self.options.size)
.appearance(false)
.cleanable()
.cleanable(true)
.p_0()
.prefix(
Icon::new(IconName::Search).text_color(cx.theme().text_muted),