Переглянути джерело

Allow scroll shortcuts

Don't unconditionally force-scroll to the bottom for any (modifier)
key but only if the user is actually typing in something.
J-P Nurmi 3 роки тому
батько
коміт
f3af857931
1 змінених файлів з 3 додано та 1 видалено
  1. 3 1
      lib/frontend/terminal_view.dart

+ 3 - 1
lib/frontend/terminal_view.dart

@@ -415,7 +415,9 @@ class _TerminalViewState extends State<TerminalView> {
     blinkOscillator.restart();
     // TODO: find a way to stop scrolling immediately after key stroke.
     widget.inputBehavior.onKeyStroke(event, widget.terminal);
-    widget.terminal.setScrollOffsetFromBottom(0);
+    if (event.character?.isNotEmpty == true) {
+      widget.terminal.setScrollOffsetFromBottom(0);
+    }
   }
 
   void onFocus(bool focused) {