Explorar el Código

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 hace 3 años
padre
commit
f3af857931
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  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) {