diff options
| -rw-r--r-- | docs/next/CHANGELOG.md | 1 | ||||
| -rw-r--r-- | src/ghostty/mod.rs | 7 |
2 files changed, 4 insertions, 4 deletions
diff --git a/docs/next/CHANGELOG.md b/docs/next/CHANGELOG.md index 1e44e91d..ff0a910a 100644 --- a/docs/next/CHANGELOG.md +++ b/docs/next/CHANGELOG.md @@ -6,6 +6,7 @@ - Relicensed Herdr from AGPL-3.0-or-later to Apache-2.0. ### Fixed +- Empty clipboard writes from pane applications no longer erase existing clipboard contents or show a copied confirmation. (#1893) - Plain mouse movement no longer triggers continuous full renders while preserving Herdr menu hover and pane application mouse tracking. (#1865) - `ui.copy_on_select = false` now retains drag and double-click word selections without copying; `Ctrl+C`, or `Cmd+C` when the host terminal forwards it, copies and clears the selection. - Pane and agent read responses now report `truncated: true` when older terminal rows were omitted. (#1717) diff --git a/src/ghostty/mod.rs b/src/ghostty/mod.rs index 66182681..c4541948 100644 --- a/src/ghostty/mod.rs +++ b/src/ghostty/mod.rs @@ -534,7 +534,6 @@ unsafe fn capture_clipboard_write( // SAFETY: userdata is the TerminalCallbackState installed with this terminal. let state = unsafe { &mut *userdata.cast::<TerminalCallbackState>() }; if request.contents_len == 0 { - state.clipboard_writes.push(Vec::new()); return ffi::GhosttyClipboardWriteResult_GHOSTTY_CLIPBOARD_WRITE_RESULT_SUCCESS; } if request.contents_len != 1 { @@ -3839,7 +3838,7 @@ mod tests { } #[test] - fn clipboard_callback_rejects_writes_the_text_pipeline_cannot_represent() { + fn clipboard_callback_ignores_clear_and_rejects_unsupported_writes() { let mut terminal = Terminal::new(10, 5, 0).unwrap(); let full_size = std::mem::size_of::<ffi::GhosttyClipboardWrite>(); let success = ffi::GhosttyClipboardWriteResult_GHOSTTY_CLIPBOARD_WRITE_RESULT_SUCCESS; @@ -3851,7 +3850,7 @@ mod tests { invoke_clipboard_callback(&mut terminal, &[], full_size), success ); - assert_eq!(terminal.take_clipboard_writes(), vec![Vec::<u8>::new()]); + assert!(terminal.take_clipboard_writes().is_empty()); let empty = test_clipboard_content(b"text/plain", b""); assert_eq!( @@ -3893,7 +3892,7 @@ mod tests { assert!(terminal.take_clipboard_writes().is_empty()); terminal.write(b"\x1b]52;c;\x07"); - assert_eq!(terminal.take_clipboard_writes(), vec![Vec::<u8>::new()]); + assert!(terminal.take_clipboard_writes().is_empty()); } #[test] |
