mirror of
https://github.com/Eugeny/tabby.git
synced 2025-09-24 09:06:03 +00:00
made warnOnMultilinePaste optional (fixes #2309)
This commit is contained in:
@@ -308,7 +308,7 @@ export class BaseTerminalTabComponent extends BaseTabComponent implements OnInit
|
|||||||
data = data.replace(/\n/g, '\r')
|
data = data.replace(/\n/g, '\r')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.alternateScreenActive && data.includes('\r')) {
|
if (!this.alternateScreenActive && data.includes('\r') && this.config.store.terminal.warnOnMultilinePaste) {
|
||||||
const canTrim = !data.trim().includes('\r')
|
const canTrim = !data.trim().includes('\r')
|
||||||
const buttons = canTrim ? ['Paste', 'Trim whitespace and paste', 'Cancel'] : ['Paste', 'Cancel']
|
const buttons = canTrim ? ['Paste', 'Trim whitespace and paste', 'Cancel'] : ['Paste', 'Cancel']
|
||||||
const result = (await this.electron.showMessageBox(
|
const result = (await this.electron.showMessageBox(
|
||||||
|
@@ -136,3 +136,12 @@ h3.mb-3 Terminal
|
|||||||
[(ngModel)]='config.store.terminal.wordSeparator',
|
[(ngModel)]='config.store.terminal.wordSeparator',
|
||||||
(ngModelChange)='config.save()',
|
(ngModelChange)='config.save()',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
.form-line
|
||||||
|
.header
|
||||||
|
.title Warn on multi-line paste
|
||||||
|
.description Show a confirmation box when pasting multiple lines
|
||||||
|
toggle(
|
||||||
|
[(ngModel)]='config.store.terminal.warnOnMultilinePaste',
|
||||||
|
(ngModelChange)='config.save()',
|
||||||
|
)
|
||||||
|
@@ -63,6 +63,7 @@ export class TerminalConfigProvider extends ConfigProvider {
|
|||||||
profiles: [],
|
profiles: [],
|
||||||
useConPTY: true,
|
useConPTY: true,
|
||||||
recoverTabs: true,
|
recoverTabs: true,
|
||||||
|
warnOnMultilinePaste: true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user