mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-08 21:40:03 +00:00
fixed #7322 - made whitespace trimming on paste optional
This commit is contained in:
parent
a29a552afc
commit
7ed7ec3cb4
@ -114,10 +114,10 @@
|
||||
dependencies:
|
||||
debug "^4.3.2"
|
||||
|
||||
"@tabby-gang/node-pty@^0.11.0-beta.202":
|
||||
version "0.11.0-beta.202"
|
||||
resolved "https://registry.yarnpkg.com/@tabby-gang/node-pty/-/node-pty-0.11.0-beta.202.tgz#4d6302f7db226f56de4f01303c9f4abd9a9d7a0f"
|
||||
integrity sha512-Z/hgI2bjWE6c0nYlCmduNnMVorGgj5868xWX2BxCB0DjsmnMSuO8ktsYjXHIV//JBqIed8TUBdS+x/mQvg/ZUQ==
|
||||
"@tabby-gang/node-pty@^0.11.0-beta.203":
|
||||
version "0.11.0-beta.204"
|
||||
resolved "https://registry.yarnpkg.com/@tabby-gang/node-pty/-/node-pty-0.11.0-beta.204.tgz#80d4393c7a233d3298f47a4755467a246b0099f9"
|
||||
integrity sha512-sNT5Z2MEkEIhToAdVAdZ/lfeQ9UgFE3h2ENlOux+WHBrl1k0BiUEIOd/jh/K3mNAGEfcZ44gNQQ50g5KXTQEmA==
|
||||
dependencies:
|
||||
nan "^2.16.0"
|
||||
|
||||
|
@ -462,7 +462,7 @@ export class BaseTerminalTabComponent extends BaseTabComponent implements OnInit
|
||||
data = data.replaceAll('\n', '\r')
|
||||
}
|
||||
|
||||
if (data.indexOf('\n') === data.length - 1) {
|
||||
if (this.config.store.terminal.trimWhitespaceOnPaste && data.indexOf('\n') === data.length - 1) {
|
||||
// Ends with a newline and has no other line breaks
|
||||
data = data.substring(0, data.length - 1)
|
||||
}
|
||||
@ -487,9 +487,11 @@ export class BaseTerminalTabComponent extends BaseTabComponent implements OnInit
|
||||
return
|
||||
}
|
||||
} else {
|
||||
if (this.config.store.terminal.trimWhitespaceOnPaste) {
|
||||
data = data.trim()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.config.store.terminal.bracketedPaste && this.frontend?.supportsBracketedPaste()) {
|
||||
data = `\x1b[200~${data}\x1b[201~`
|
||||
|
@ -153,6 +153,15 @@ div.mt-4
|
||||
(ngModelChange)='config.save()',
|
||||
)
|
||||
|
||||
.form-line
|
||||
.header
|
||||
.title(translate) Trim whitespace and newlines
|
||||
.description(translate) Remove whitespace and newlines around the copied text
|
||||
toggle(
|
||||
[(ngModel)]='config.store.terminal.trimWhitespaceOnPaste',
|
||||
(ngModelChange)='config.save()',
|
||||
)
|
||||
|
||||
div.mt-4
|
||||
h3(translate) Sound
|
||||
|
||||
|
@ -70,6 +70,7 @@ export class TerminalConfigProvider extends ConfigProvider {
|
||||
drawBoldTextInBrightColors: true,
|
||||
sixel: true,
|
||||
minimumContrastRatio: 4,
|
||||
trimWhitespaceOnPaste: true,
|
||||
},
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user