tui: add composer input history recall

This commit is contained in:
2026-05-29 18:17:26 +09:00
parent 4c3ba12b43
commit d42b4c22e1
3 changed files with 338 additions and 4 deletions
+8
View File
@@ -176,6 +176,14 @@ impl InputBuffer {
self.atoms.is_empty()
}
pub fn cursor_at_start(&self) -> bool {
self.cursor == 0
}
pub fn cursor_at_end(&self) -> bool {
self.cursor == self.atoms.len()
}
/// Replace the whole composer with protocol segments previously emitted
/// by [`submit_segments`](Self::submit_segments), preserving typed chips
/// and placing the cursor at the end of the restored input.