• R/O
  • HTTP
  • SSH
  • HTTPS

FooEditEngine: Commit


Commit MetaInfo

Revision450b22e9241eea1a294b4eb819114baa89cd67a8 (tree)
Time2021-01-08 00:21:32
Authortest <test@yaho...>
Commitertest

Log Message

キャレットが画面がにはみ出た時の挙動を以前のに戻した

Change Summary

Incremental Difference

--- a/Core/EditView.cs
+++ b/Core/EditView.cs
@@ -501,7 +501,7 @@ namespace FooEditEngine
501501 /// <summary>
502502 /// 指定した座標の一番近くにあるTextPointを取得する
503503 /// </summary>
504- /// <param name="p">テキストエリアを左上とする相対位置</param>
504+ /// <param name="p">ビューエリアを左上とする相対位置</param>
505505 /// <param name="searchRange">探索範囲</param>
506506 /// <returns>レイアウトラインを指し示すTextPoint</returns>
507507 public TextPoint GetTextPointFromPostion(Point p,TextPointSearchRange searchRange = TextPointSearchRange.TextAreaOnly)
@@ -767,13 +767,12 @@ namespace FooEditEngine
767767 }
768768 else if(caret_y >= alignedHeight)
769769 {
770- double caretYFromTextArea = alignedHeight;
771- var newsrc = this.GetNearstRowAndOffsetY(tp.row, -caretYFromTextArea);
770+ var newsrc = this.GetNearstRowAndOffsetY(tp.row, -(alignedHeight - relPoint.Y));
772771 if(newsrc == null)
773772 this.Document.Src = new SrcPoint(this.Src.X, tp.row, 0);
774773 else
775774 this.Document.Src = new SrcPoint(this.Src.X, newsrc.Item1, -newsrc.Item2);
776- y = caretYFromTextArea;
775+ y = alignedHeight;
777776 }
778777 y += this.render.TextArea.Y;
779778 result = true;
Show on old repository browser