OSDN Git Service

GapBufferが更新されていた
[fooeditengine/FooEditEngine.git] / Core / StringBuffer.cs
index d96cc5e..b1a03c9 100644 (file)
@@ -51,7 +51,7 @@ namespace FooEditEngine
         public StringBuffer(StringBuffer buffer)
             : this()
         {
-            buf.AddRange(buffer.buf, buffer.Length);
+            buf.AddRange(buffer.buf);
         }
 
 
@@ -105,7 +105,7 @@ namespace FooEditEngine
             {
                 if (length > 0)
                     this.buf.RemoveRange(index, length);
-                this.buf.InsertRange(index, chars, count);
+                this.buf.InsertRange(index, chars);
             }
             this.Update(this, new DocumentUpdateEventArgs(UpdateType.Replace, index, length, count));
         }
@@ -128,7 +128,7 @@ namespace FooEditEngine
                 using (await this.rwlock.WriterLockAsync())
                 {
                     //str.lengthは事前に確保しておくために使用するので影響はない
-                    this.buf.InsertRange(index, internal_str, str.Length);
+                    this.buf.InsertRange(index, internal_str);
                 }
 
                 if (tokenSource != null)
@@ -186,7 +186,7 @@ namespace FooEditEngine
                     //空行は削除する必要はない
                     if (lineHeadIndex < this.buf.Count)
                         this.buf.RemoveRange(lineHeadIndex, lineLength);
-                    this.buf.InsertRange(lineHeadIndex, output, output.Length);
+                    this.buf.InsertRange(lineHeadIndex, output);
                 }
 
                 this.Update(this, new DocumentUpdateEventArgs(UpdateType.Replace, lineHeadIndex, lineLength, output.Length, i));
@@ -207,7 +207,7 @@ namespace FooEditEngine
                     using (this.rwlock.WriterLock())
                     {
                         this.buf.RemoveRange(right, target.Length);
-                        this.buf.InsertRange(right, pattern_chars, pattern.Length);
+                        this.buf.InsertRange(right, pattern_chars);
                     }
                     left = right + pattern.Length;
                     newLineLength += pattern.Length - target.Length;