fixed #10454 - "Warn on multi-line paste" fails to trigger on Unix-style newlines (\n) in Windows

This commit is contained in:
Eugene 2025-05-25 08:46:34 +02:00
parent 4a5087afc1
commit 912e0aa426
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4

View File

@ -542,7 +542,7 @@ export class BaseTerminalTabComponent<P extends BaseTerminalProfile> extends Bas
} }
if (!this.alternateScreenActive) { if (!this.alternateScreenActive) {
if (data.includes('\r') && this.config.store.terminal.warnOnMultilinePaste) { if ((data.includes('\r') || data.includes('\n')) && this.config.store.terminal.warnOnMultilinePaste) {
const buttons = [ const buttons = [
this.translate.instant('Paste'), this.translate.instant('Paste'),
this.translate.instant('Cancel'), this.translate.instant('Cancel'),