T09: the tap holds one mouse tracking and one format as xterm does, any reset ends it; every reported button keeps its release, motion reports the first held; URLs keep combining marks; selections log start, run and end; shot hands real buttons to the view and shows its window without activating
CI / platforms (windows-latest) (push) Failing after 7s
CI / macos (push) Failing after 8m26s
CI / platforms (ubuntu-24.04) (push) Canceled after 0s

This commit is contained in:
ZacharyZhang-NY committed 2026-10-14 15:51:44 -04:00
1 parent 9f81f1f704
commit d6fa38e60b
10 files changed
+311 -206

No files matched your search

+8 -1
View File
@@ -4,7 +4,7 @@ use alacritty_terminal::{
};
use ely_gpui_component::terminal::{Target, links};
/// The link at `point`: the program's OSC 8 target, else a URL in its line, wrapped rows joined.
/// The OSC 8 target at `point`, else a URL in its wrapped line.
pub fn link_at<T>(term: &Term<T>, mut point: Point) -> Option<String> {
let grid = term.grid();
if grid[point].flags.contains(Flags::WIDE_CHAR_SPACER) {
@@ -23,6 +23,7 @@ pub fn link_at<T>(term: &Term<T>, mut point: Point) -> Option<String> {
let spacer = Flags::WIDE_CHAR_SPACER | Flags::LEADING_WIDE_CHAR_SPACER;
if !grid[cell].flags.intersects(spacer) {
text.push(grid[cell].c);
text.extend(grid[cell].zerowidth().into_iter().flatten());
}
if cell == end {
break;
@@ -70,6 +71,12 @@ mod tests {
assert_eq!(link(text, 0, 11), None);
}
#[test]
fn a_url_keeps_its_combining_marks() {
let text = "https://e.test/cafe\u{301}/x";
assert_eq!(link(text, 1, 1).as_deref(), Some(text));
}
#[test]
fn a_url_runs_across_wrapped_rows_and_wide_cells() {
let text = "\u{4e2d} https://ely.dev/abc";