Przeglądaj źródła

adds "doReflow" to the resize method of the buffer

devmil 4 lat temu
rodzic
commit
c5cd938430
2 zmienionych plików z 4 dodań i 4 usunięć
  1. 2 2
      lib/buffer/buffer.dart
  2. 2 2
      lib/terminal/terminal.dart

+ 2 - 2
lib/buffer/buffer.dart

@@ -519,7 +519,7 @@ class Buffer {
     lines.removeAt(index);
   }
 
-  void resize(int width, int height, int oldWidth, int oldHeight) {
+  void resize(int width, int height, int oldWidth, int oldHeight, bool doReflow) {
     if (this.lines.length > 0) {
       if (oldHeight < height) {
         for (int y = oldHeight; y < height; y++) {
@@ -542,7 +542,7 @@ class Buffer {
 
     // ScrollBottom = newRows - 1;
 
-    if (/*IsReflowEnabled*/ true) {
+    if (doReflow) {
       final rf = BufferReflow(this);
       rf.doReflow(oldWidth, width);
     }

+ 2 - 2
lib/terminal/terminal.dart

@@ -333,8 +333,8 @@ class Terminal with Observable {
     _viewWidth = max(width, 1);
     _viewHeight = max(height, 1);
 
-    //_altBuffer.resize(width, height, oldWidth, oldHeight);
-    _mainBuffer.resize(width, height, oldWidth, oldHeight);
+    _altBuffer.resize(width, height, oldWidth, oldHeight, false);
+    _mainBuffer.resize(width, height, oldWidth, oldHeight, true /* might be a setting for the terminal */);
 
     if (buffer == _altBuffer) {
       buffer.clearScrollback();