Browse Source

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

Eugene 5 months ago
parent
commit
912e0aa426
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tabby-terminal/src/api/baseTerminalTab.component.ts

+ 1 - 1
tabby-terminal/src/api/baseTerminalTab.component.ts

@@ -542,7 +542,7 @@ export class BaseTerminalTabComponent<P extends BaseTerminalProfile> extends Bas
         }
 
         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 = [
                     this.translate.instant('Paste'),
                     this.translate.instant('Cancel'),