feat: preferences for remote clipboard writes, multi-line paste confirmation and the launch update check

OSC 52 and VNC ServerCutText now go through one handler that honours
'allow remote clipboard' and always toasts the first line, so a silent
clipboard swap can't set up a paste into another shell (SEC-20261012-010).
Multi-line pastes into a terminal without bracketed paste ask first, with a
preview (SEC-20261012-017). The launch-time update check can be turned off
and the updater docs no longer claim it is opt-in; the unused GitHub
fallback is removed (SEC-20261012-013, F15).
This commit is contained in:
Andy Dixon
2026-10-12 08:57:30 +01:00
parent 764208727c
commit 534310b56d
10 changed files with 126 additions and 71 deletions
+7
View File
@@ -328,6 +328,7 @@ pub fn pane(app: &mut App, ui: &mut Ui, id: &str, rect: Rect) {
find_bar(app, ui, term);
}
let theme = crate::terminal_themes::get(&theme_id);
term.confirm_paste = app.s.prefs.confirm_multiline_paste;
let r = term.ui(ui, theme, focused_tab);
if pane.highlight_until > app.s.now {
ui.painter().rect_stroke(rect.shrink(1.0), 0.0, Stroke::new(2.0, t.warning), egui::StrokeKind::Inside);
@@ -379,6 +380,12 @@ fn terminal_response(app: &mut App, id: &str, r: TermResponse, local_exited: boo
if r.bell {
app.s.ctx.request_repaint();
}
if let Some(text) = r.clipboard {
app.remote_clipboard(&text);
}
if let Some(text) = r.confirm_paste {
app.dialog = Some(crate::app::Dialog::ConfirmPaste { session: id.into(), text });
}
if let Some(a) = r.menu {
app.terminal_menu(id, a);
}