From c2887621a37f429e2e05b561631fff01da8bd462 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Mon, 23 Sep 2024 11:35:15 +0200 Subject: allow OSC-52 clipboards on all terminal emulators * The XTerm version is still checked if we detect running under XTerm. * Actually, the XTerm implementation is broken for Unicode clipboard contents. * Kitty supports OSC-52, but you __must__ enable read-clipboard. With read-clipboard-ask, there will be a timeout. But we cannot read without a timeout since otherwise we would hang indefinitely if the escape sequence turns out to not work. * For urxvt, I have hacked an existing extension: https://gist.github.com/rhaberkorn/d7406420b69841ebbcab97548e38b37d * st currently supports only setting the clipboard, but not querying it. --- src/core-commands.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/core-commands.c') diff --git a/src/core-commands.c b/src/core-commands.c index 300ffef..abe5604 100644 --- a/src/core-commands.c +++ b/src/core-commands.c @@ -2061,10 +2061,9 @@ teco_state_ecommand_close(teco_machine_main_t *ctx, GError **error) * - 128: Enable/Disable enforcement of UNIX98 * \(lq/bin/sh\(rq emulation for operating system command * executions - * - 256: Enable/Disable \fBxterm\fP(1) clipboard support. - * Should only be enabled if XTerm allows the - * \fIGetSelection\fP and \fISetSelection\fP window - * operations. + * - 256: Enable/Disable OSC-52 clipboard support. + * Must only be enabled if the terminal emulator is configured + * properly. * - 512: Enable/Disable Unicode icons in the Curses UI. * This requires a capable font, like the ones provided * by the \(lqNerd Fonts\(rq project. -- cgit v1.2.3