Revision | 450b22e9241eea1a294b4eb819114baa89cd67a8 (tree) |
---|---|
Time | 2021-01-08 00:21:32 |
Author | test <test@yaho...> |
Commiter | test |
キャレットが画面がにはみ出た時の挙動を以前のに戻した
@@ -501,7 +501,7 @@ namespace FooEditEngine | ||
501 | 501 | /// <summary> |
502 | 502 | /// 指定した座標の一番近くにあるTextPointを取得する |
503 | 503 | /// </summary> |
504 | - /// <param name="p">テキストエリアを左上とする相対位置</param> | |
504 | + /// <param name="p">ビューエリアを左上とする相対位置</param> | |
505 | 505 | /// <param name="searchRange">探索範囲</param> |
506 | 506 | /// <returns>レイアウトラインを指し示すTextPoint</returns> |
507 | 507 | public TextPoint GetTextPointFromPostion(Point p,TextPointSearchRange searchRange = TextPointSearchRange.TextAreaOnly) |
@@ -767,13 +767,12 @@ namespace FooEditEngine | ||
767 | 767 | } |
768 | 768 | else if(caret_y >= alignedHeight) |
769 | 769 | { |
770 | - double caretYFromTextArea = alignedHeight; | |
771 | - var newsrc = this.GetNearstRowAndOffsetY(tp.row, -caretYFromTextArea); | |
770 | + var newsrc = this.GetNearstRowAndOffsetY(tp.row, -(alignedHeight - relPoint.Y)); | |
772 | 771 | if(newsrc == null) |
773 | 772 | this.Document.Src = new SrcPoint(this.Src.X, tp.row, 0); |
774 | 773 | else |
775 | 774 | this.Document.Src = new SrcPoint(this.Src.X, newsrc.Item1, -newsrc.Item2); |
776 | - y = caretYFromTextArea; | |
775 | + y = alignedHeight; | |
777 | 776 | } |
778 | 777 | y += this.render.TextArea.Y; |
779 | 778 | result = true; |