History

Fix ci error – Copy to clipboard isn't implemented in tests

Nate Butler committed 2 years ago

Commit 4ee4e4e1 parent 2bf48871 file · +4 −2Browse files

Unified · Split

crates/editor2/src/editor.rs+4−2
@@ -9695,7 +9695,8 @@ pub fn diagnostic_block_renderer(diagnostic: Diagnostic, is_valid: bool) -> Rend · 9694 unmodified lines
96959695 Arc::new(move |cx: &mut BlockContext| {
96969696 let message = message.clone();
96979697 let copy_id: SharedString = format!("copy-{}", cx.block_id.clone()).to_string().into();
9698− let write_to_clipboard = cx.write_to_clipboard(ClipboardItem::new(message.clone()));
9698+ // TODO: `cx.write_to_clipboard` is not implemented in tests.
9699+ // let write_to_clipboard = cx.write_to_clipboard(ClipboardItem::new(message.clone()));
96999700
97009701 // TODO: Nate: We should tint the background of the block with the severity color
97019702 // We need to extend the theme before we can do this
@@ -9718,7 +9719,8 @@ pub fn diagnostic_block_renderer(diagnostic: Diagnostic, is_valid: bool) -> Rend · 16 unmodified lines
97189719 IconButton::new(copy_id.clone(), Icon::Copy)
97199720 // .color(Color::Muted)
97209721 .size(ButtonSize::Compact)
9721− .on_click(cx.listener(move |_, _, cx| write_to_clipboard))
9722+ // TODO: `cx.write_to_clipboard` is not implemented in tests.
9723+ // .on_click(cx.listener(move |_, _, cx| write_to_clipboard))
97229724 .tooltip(|cx| Tooltip::text("Copy diagnostic message", cx)),
97239725 )
97249726 }))

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t