OSDN Git Service

CalculateLineCountOnScreen()を呼び出すタイミングを変更した
authorgdkhd812 <jbh03215@htmil.co.jp>
Mon, 2 Sep 2013 10:53:26 +0000 (19:53 +0900)
committergdkhd812 <jbh03215@htmil.co.jp>
Mon, 2 Sep 2013 10:53:26 +0000 (19:53 +0900)
Common/Controller.cs

index 000a2de..3538837 100644 (file)
@@ -617,7 +617,6 @@ namespace FooEditEngine
         public void DoEnterAction()\r
         {            \r
             this.DoInputChar('\n');\r
-            this.View.CalculateLineCountOnScreen();\r
         }\r
 \r
         /// <summary>\r
@@ -1108,6 +1107,8 @@ namespace FooEditEngine
             switch (e.type)\r
             {\r
                 case UpdateType.Replace:\r
+                    if(this.Document[e.startIndex] == Document.NewLine)\r
+                        this.View.CalculateLineCountOnScreen();\r
                     this.JumpCaret(e.startIndex + e.insertLength,true);\r
                     break;\r
                 case UpdateType.Clear:\r