OSDN Git Service

無駄な再描写をしないようにした
authorgdkhd812 <test@nnn.co.jp>
Tue, 27 Oct 2015 12:39:06 +0000 (18:09 +0530)
committergdkhd812 <test@nnn.co.jp>
Tue, 27 Oct 2015 12:39:06 +0000 (18:09 +0530)
Core/LineToIndex.cs
Core/ViewBase.cs

index 1bf4fd8..8525b8a 100644 (file)
@@ -720,10 +720,11 @@ namespace FooEditEngine
                 return false;
             long nowTick = DateTime.Now.Ticks;
             bool sync = force || !this._IsSync;
-            if (sync || Math.Abs(nowTick - this.lastUpdateTicks) >= AllowCallTicks)
+            if (sync && Math.Abs(nowTick - this.lastUpdateTicks) >= AllowCallTicks)
             {
                 this.GenerateFolding(0, this.Document.Length - 1);
                 this.lastUpdateTicks = nowTick;
+                this._IsSync = true;
                 return true;
             }
             return false;
@@ -783,6 +784,8 @@ namespace FooEditEngine
 
                 this.lastUpdateTicks = nowTick;
 
+                this._IsSync = true;
+
                 return true;
             }
             return false;
@@ -796,6 +799,7 @@ namespace FooEditEngine
             foreach (LineToIndexTableData line in this.Lines)
                 line.Syntax = null;
             this.ClearLayoutCache();
+            this._IsSync = false;
         }
 
         /// <summary>
index e4752b2..c91d38a 100644 (file)
@@ -204,6 +204,7 @@ namespace FooEditEngine
         /// <summary>
         /// シンタックスハイライター
         /// </summary>
+        /// <remarks>差し替えた場合、再構築する必要があります</remarks>
         public IHilighter Hilighter
         {
             get { return this._LayoutLines.Hilighter; }