aboutsummaryrefslogtreecommitdiff
path: root/src/pane.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-05-12 15:54:19 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-05-12 15:54:19 +0300
commit4af28fbb6551cd33596096af422895c1998fa3e8 (patch)
tree06d92a8a1cf53a2d85129f0e6d3e9701a75eda1b /src/pane.rs
parent8375922c069a244133d083a0bb50273e134be6b1 (diff)
test: add ime input regressions
Diffstat (limited to 'src/pane.rs')
-rw-r--r--src/pane.rs15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/pane.rs b/src/pane.rs
index bf669ecf..98edf403 100644
--- a/src/pane.rs
+++ b/src/pane.rs
@@ -925,7 +925,15 @@ impl PaneRuntime {
#[cfg(test)]
impl PaneRuntime {
pub(crate) fn test_with_channel(cols: u16, rows: u16) -> (Self, mpsc::Receiver<Bytes>) {
- Self::test_with_channel_and_scrollback_bytes(cols, rows, 0, &[])
+ Self::test_with_channel_and_scrollback_bytes(cols, rows, 0, &[], 4)
+ }
+
+ pub(crate) fn test_with_channel_capacity(
+ cols: u16,
+ rows: u16,
+ capacity: usize,
+ ) -> (Self, mpsc::Receiver<Bytes>) {
+ Self::test_with_channel_and_scrollback_bytes(cols, rows, 0, &[], capacity)
}
pub(crate) fn test_with_screen_bytes(cols: u16, rows: u16, bytes: &[u8]) -> Self {
@@ -938,7 +946,7 @@ impl PaneRuntime {
scrollback_limit_bytes: usize,
bytes: &[u8],
) -> Self {
- Self::test_with_channel_and_scrollback_bytes(cols, rows, scrollback_limit_bytes, bytes).0
+ Self::test_with_channel_and_scrollback_bytes(cols, rows, scrollback_limit_bytes, bytes, 4).0
}
fn test_with_channel_and_scrollback_bytes(
@@ -946,8 +954,9 @@ impl PaneRuntime {
rows: u16,
scrollback_limit_bytes: usize,
bytes: &[u8],
+ channel_capacity: usize,
) -> (Self, mpsc::Receiver<Bytes>) {
- let (tx, rx) = mpsc::channel(4);
+ let (tx, rx) = mpsc::channel(channel_capacity);
let (resize_tx, _resize_rx) = watch::channel((rows, cols));
let mut terminal =
crate::ghostty::Terminal::new(cols, rows, scrollback_limit_bytes).unwrap();