diff --git a/tabby-terminal/src/components/terminalSettingsTab.component.pug b/tabby-terminal/src/components/terminalSettingsTab.component.pug index 765d2385..365f4ce9 100644 --- a/tabby-terminal/src/components/terminalSettingsTab.component.pug +++ b/tabby-terminal/src/components/terminalSettingsTab.component.pug @@ -127,6 +127,14 @@ div.mt-4 (ngModelChange)='config.save()', ) + .form-line + .header + .title(translate) Copy with formatting + toggle( + [(ngModel)]='config.store.terminal.copyAsHTML', + (ngModelChange)='config.save()', + ) + .form-line .header .title(translate) Bracketed paste (requires shell support) diff --git a/tabby-terminal/src/config.ts b/tabby-terminal/src/config.ts index 2acef16a..99270715 100644 --- a/tabby-terminal/src/config.ts +++ b/tabby-terminal/src/config.ts @@ -24,6 +24,7 @@ export class TerminalConfigProvider extends ConfigProvider { rightClick: 'menu', pasteOnMiddleClick: true, copyOnSelect: false, + copyAsHTML: true, scrollOnInput: true, altIsMeta: false, wordSeparator: ' ()[]{}\'"', diff --git a/tabby-terminal/src/frontends/xtermFrontend.ts b/tabby-terminal/src/frontends/xtermFrontend.ts index 66d243c9..fc2077ab 100644 --- a/tabby-terminal/src/frontends/xtermFrontend.ts +++ b/tabby-terminal/src/frontends/xtermFrontend.ts @@ -217,7 +217,7 @@ export class XTermFrontend extends Frontend { if (!text.trim().length) { return } - if (text.length < 1024 * 32) { + if (text.length < 1024 * 32 && this.configService.store.terminal.copyAsHTML) { this.platformService.setClipboard({ text: this.getSelection(), html: this.getSelectionAsHTML(),