Преглед на файлове

fixes #10039 - ignore focus escape sequences when auto-scrolling to the bottom (#10555)

SilverFox преди 3 месеца
родител
ревизия
0cf9886270
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      tabby-terminal/src/api/baseTerminalTab.component.ts

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

@@ -17,6 +17,8 @@ import { getTerminalBackgroundColor } from '../helpers'
 
 
 const INACTIVE_TAB_UNLOAD_DELAY = 1000 * 30
+const OSC_FOCUS_IN = Buffer.from('\x1b[I')
+const OSC_FOCUS_OUT = Buffer.from('\x1b[O')
 
 /**
  * A class to base your custom terminal tabs on
@@ -494,7 +496,7 @@ export class BaseTerminalTabComponent<P extends BaseTerminalProfile> extends Bas
             data = Buffer.from(data, 'utf-8')
         }
         this.session?.feedFromTerminal(data)
-        if (this.config.store.terminal.scrollOnInput) {
+        if (this.config.store.terminal.scrollOnInput && !data.equals(OSC_FOCUS_IN) && !data.equals(OSC_FOCUS_OUT)) {
             this.frontend?.scrollToBottom()
         }
     }