T44d Web · Stories stand alone: nested ones surface, hidden ones drop their demos, early themes land, pastes arrive

This commit is contained in:
ZacharyZhang-NY committed 2026-09-29 19:16:41 -04:00
1 parent edab58e91a
commit 2463bb0ac9
22 files changed
+352 -172

No files matched your search

+17 -1
View File
@@ -1,6 +1,9 @@
use std::time::Duration;
use gpui::{Entity, EntityInputHandler, KeyUpEvent, Keystroke, TestAppContext, VisualTestContext};
use gpui::{
ClipboardItem, Entity, EntityInputHandler, KeyUpEvent, Keystroke, TestAppContext,
VisualTestContext,
};
use super::{CodeEditor, GhostText, InlayHint, LineNumbers, layout::Row};
use crate::theme::Theme;
@@ -240,3 +243,16 @@ impl CodeEditor {
super::layout::rows(&self.buffer, &hide, &self.marks).contains(&Row::Line(line))
}
}
#[gpui::test]
fn a_browser_paste_gives_each_cursor_its_line(cx: &mut TestAppContext) {
let (editor, cx) = editor("a\nb", cx);
cx.update(|window, cx| {
editor.update(cx, |editor, cx| {
let (first, second) = (1..1, 3..3);
editor.select([first, second], cx);
EntityInputHandler::paste(editor, ClipboardItem::new_string("1\n2".into()), window, cx);
assert_eq!(editor.text(), "a1\nb2");
})
});
}