mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-08 05:20:01 +00:00
This commit is contained in:
parent
fbea7db188
commit
2bf0ef3c1a
@ -456,13 +456,12 @@ export class BaseTerminalTabComponent extends BaseTabComponent implements OnInit
|
|||||||
data = data.replaceAll('\n', '\r')
|
data = data.replaceAll('\n', '\r')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.endsWith('\n')) {
|
if (data.indexOf('\n') === data.length - 1) {
|
||||||
|
// Ends with a newline and has no other line breaks
|
||||||
data = data.substring(0, data.length - 1)
|
data = data.substring(0, data.length - 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.alternateScreenActive) {
|
if (!this.alternateScreenActive) {
|
||||||
data = data.trim()
|
|
||||||
|
|
||||||
if (data.includes('\r') && this.config.store.terminal.warnOnMultilinePaste) {
|
if (data.includes('\r') && this.config.store.terminal.warnOnMultilinePaste) {
|
||||||
const buttons = [
|
const buttons = [
|
||||||
this.translate.instant('Paste'),
|
this.translate.instant('Paste'),
|
||||||
@ -481,6 +480,8 @@ export class BaseTerminalTabComponent extends BaseTabComponent implements OnInit
|
|||||||
if (result === 1) {
|
if (result === 1) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
data = data.trim()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user