option to force plain-text copying - fixes #5050

This commit is contained in:
Eugene Pankov 2022-04-03 13:57:40 +02:00
parent 8e00761b0c
commit 911e72c398
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4
3 changed files with 10 additions and 1 deletions

View File

@ -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)

View File

@ -24,6 +24,7 @@ export class TerminalConfigProvider extends ConfigProvider {
rightClick: 'menu',
pasteOnMiddleClick: true,
copyOnSelect: false,
copyAsHTML: true,
scrollOnInput: true,
altIsMeta: false,
wordSeparator: ' ()[]{}\'"',

View File

@ -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(),