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:
|
dependencies:
|
||||||
debug "^4.3.2"
|
debug "^4.3.2"
|
||||||
|
|
||||||
"@tabby-gang/node-pty@^0.11.0-beta.202":
|
"@tabby-gang/node-pty@^0.11.0-beta.203":
|
||||||
version "0.11.0-beta.202"
|
version "0.11.0-beta.204"
|
||||||
resolved "https://registry.yarnpkg.com/@tabby-gang/node-pty/-/node-pty-0.11.0-beta.202.tgz#4d6302f7db226f56de4f01303c9f4abd9a9d7a0f"
|
resolved "https://registry.yarnpkg.com/@tabby-gang/node-pty/-/node-pty-0.11.0-beta.204.tgz#80d4393c7a233d3298f47a4755467a246b0099f9"
|
||||||
integrity sha512-Z/hgI2bjWE6c0nYlCmduNnMVorGgj5868xWX2BxCB0DjsmnMSuO8ktsYjXHIV//JBqIed8TUBdS+x/mQvg/ZUQ==
|
integrity sha512-sNT5Z2MEkEIhToAdVAdZ/lfeQ9UgFE3h2ENlOux+WHBrl1k0BiUEIOd/jh/K3mNAGEfcZ44gNQQ50g5KXTQEmA==
|
||||||
dependencies:
|
dependencies:
|
||||||
nan "^2.16.0"
|
nan "^2.16.0"
|
||||||
|
|
||||||
|
@ -462,7 +462,7 @@ export class BaseTerminalTabComponent extends BaseTabComponent implements OnInit
|
|||||||
data = data.replaceAll('\n', '\r')
|
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
|
// Ends with a newline and has no other line breaks
|
||||||
data = data.substring(0, data.length - 1)
|
data = data.substring(0, data.length - 1)
|
||||||
}
|
}
|
||||||
@ -487,7 +487,9 @@ export class BaseTerminalTabComponent extends BaseTabComponent implements OnInit
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
data = data.trim()
|
if (this.config.store.terminal.trimWhitespaceOnPaste) {
|
||||||
|
data = data.trim()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,6 +153,15 @@ div.mt-4
|
|||||||
(ngModelChange)='config.save()',
|
(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
|
div.mt-4
|
||||||
h3(translate) Sound
|
h3(translate) Sound
|
||||||
|
|
||||||
|
@ -70,6 +70,7 @@ export class TerminalConfigProvider extends ConfigProvider {
|
|||||||
drawBoldTextInBrightColors: true,
|
drawBoldTextInBrightColors: true,
|
||||||
sixel: true,
|
sixel: true,
|
||||||
minimumContrastRatio: 4,
|
minimumContrastRatio: 4,
|
||||||
|
trimWhitespaceOnPaste: true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user