mirror of
https://github.com/Eugeny/tabby.git
synced 2024-12-03 06:11:57 +08:00
made warnOnMultilinePaste optional (fixes #2309)
This commit is contained in:
parent
5d431fa9cf
commit
09d55979ce
@ -308,7 +308,7 @@ export class BaseTerminalTabComponent extends BaseTabComponent implements OnInit
|
||||
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 buttons = canTrim ? ['Paste', 'Trim whitespace and paste', 'Cancel'] : ['Paste', 'Cancel']
|
||||
const result = (await this.electron.showMessageBox(
|
||||
|
@ -136,3 +136,12 @@ h3.mb-3 Terminal
|
||||
[(ngModel)]='config.store.terminal.wordSeparator',
|
||||
(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: [],
|
||||
useConPTY: true,
|
||||
recoverTabs: true,
|
||||
warnOnMultilinePaste: true,
|
||||
},
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user