Fix transcript bottom scroll
This commit is contained in:
Generated
+1
-1
@@ -226,7 +226,7 @@ checksum = "8ae3f5d315924270530207e2a68396c3cc547f6dca3fbdca317cfb1a51edb593"
|
||||
|
||||
[[package]]
|
||||
name = "cassady"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "cassady"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
edition = "2021"
|
||||
description = "Cassady/Cass minimal terminal coding agent"
|
||||
license = "MIT"
|
||||
|
||||
+5
-3
@@ -600,9 +600,6 @@ fn ratatui_wrapped_row_count(line: &str, content_width: usize) -> usize {
|
||||
non_whitespace_previous = !is_whitespace;
|
||||
}
|
||||
|
||||
if !pending_line_has_symbols && word_symbols == 0 && whitespace_symbols > 0 {
|
||||
rows = rows.saturating_add(1);
|
||||
}
|
||||
if whitespace_symbols > 0 || word_symbols > 0 {
|
||||
pending_line_has_symbols = true;
|
||||
}
|
||||
@@ -993,6 +990,11 @@ mod tests {
|
||||
assert_eq!(max_transcript_scroll(&transcript, false, false, area), 0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn whitespace_only_line_counts_as_one_wrapped_row() {
|
||||
assert_eq!(ratatui_wrapped_row_count(" ", 80), 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn input_height_wraps_long_line() {
|
||||
// A single long line with no newlines should occupy more than 1 row
|
||||
|
||||
Reference in New Issue
Block a user