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
9695 Arc::new(move |cx: &mut BlockContext| {9695 Arc::new(move |cx: &mut BlockContext| {
9696 let message = message.clone();9696 let message = message.clone();
9697 let copy_id: SharedString = format!("copy-{}", cx.block_id.clone()).to_string().into();9697 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()));
9699 9700
9700 // TODO: Nate: We should tint the background of the block with the severity color9701 // TODO: Nate: We should tint the background of the block with the severity color
9701 // We need to extend the theme before we can do this9702 // 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
9718 IconButton::new(copy_id.clone(), Icon::Copy)9719 IconButton::new(copy_id.clone(), Icon::Copy)
9719 // .color(Color::Muted)9720 // .color(Color::Muted)
9720 .size(ButtonSize::Compact)9721 .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))
9722 .tooltip(|cx| Tooltip::text("Copy diagnostic message", cx)),9724 .tooltip(|cx| Tooltip::text("Copy diagnostic message", cx)),
9723 )9725 )
9724 }))9726 }))

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