T18 review fixes: a missing folder stops the start, combining marks paint on their cell, the terminal is a Tab stop and keeps its wheel, clear drops find matches; the gallery starts a fresh shell per pick and picks the shell tab before typing

This commit is contained in:
ZacharyZhang-NY committed 2026-09-26 01:44:13 -04:00
1 parent 7da1368cd9
commit f6ad8d1e50
9 files changed
+134 -26

No files matched your search

+34 -14
View File
@@ -8,7 +8,7 @@ use gpui::{
};
use super::{
frame::{Frame, Lit},
frame::{Frame, Lit, Style},
links::Target,
view::Terminal,
};
@@ -28,6 +28,23 @@ pub(crate) struct Look {
pub link: Hsla,
}
/// The face a style prints in.
fn font(style: &Style, base: &Font) -> Font {
Font {
weight: if style.bold {
FontWeight::BOLD
} else {
FontWeight::NORMAL
},
style: if style.italic {
FontStyle::Italic
} else {
FontStyle::Normal
},
..base.clone()
}
}
/// The grid, fitted to its box: it tells the terminal its size and origin, then paints each row.
pub(crate) fn grid(
terminal: Entity<Terminal>,
@@ -63,19 +80,7 @@ pub(crate) fn grid(
.iter()
.map(|(len, style)| TextRun {
len: *len,
font: Font {
weight: if style.bold {
FontWeight::BOLD
} else {
FontWeight::NORMAL
},
style: if style.italic {
FontStyle::Italic
} else {
FontStyle::Normal
},
..look.font.clone()
},
font: font(style, &look.font),
color: style.fg,
background_color: style.bg,
underline: style.underline.then_some(UnderlineStyle {
@@ -110,6 +115,21 @@ pub(crate) fn grid(
shaped
.paint(at(ix, 0), cell.height, window, cx)
.expect("a terminal row paints");
for (column, cluster, style) in &row.clusters {
let run = TextRun {
len: cluster.len(),
font: font(style, &look.font),
color: style.fg,
background_color: None,
underline: None,
strikethrough: None,
};
window
.text_system()
.shape_line(cluster.clone().into(), look.size, &[run], None)
.paint(at(ix, *column), cell.height, window, cx)
.expect("a terminal cluster paints");
}
}
if let Some((row, columns, _)) = &hovered {
let under = at(*row, columns.start) + point(Pixels::ZERO, cell.height - look.rule);