devmil před 4 roky
rodič
revize
e3558e56bb
2 změnil soubory, kde provedl 6 přidání a 0 odebrání
  1. 1 0
      lib/buffer/buffer.dart
  2. 5 0
      lib/utli/circular_list.dart

+ 1 - 0
lib/buffer/buffer.dart

@@ -422,6 +422,7 @@ class Buffer {
   }
 
   void clear() {
+    lines.clear();
     for (int i = 0; i < terminal.viewHeight; i++) {
       lines.addNew();
     }

+ 5 - 0
lib/utli/circular_list.dart

@@ -71,6 +71,11 @@ class CircularList<T> {
     _array[_getCyclicIndex(index)] = value;
   }
 
+  void clear() {
+    _startIndex = 0;
+    _length = 0;
+  }
+
   void addNew() {
     _prepareItem(_array[_getCyclicIndex(_length)]);
     if (_length == _array.length) {