From 450b22e9241eea1a294b4eb819114baa89cd67a8 Mon Sep 17 00:00:00 2001 From: test Date: Fri, 8 Jan 2021 00:21:32 +0900 Subject: [PATCH] =?utf8?q?=E3=82=AD=E3=83=A3=E3=83=AC=E3=83=83=E3=83=88?= =?utf8?q?=E3=81=8C=E7=94=BB=E9=9D=A2=E3=81=8C=E3=81=AB=E3=81=AF=E3=81=BF?= =?utf8?q?=E5=87=BA=E3=81=9F=E6=99=82=E3=81=AE=E6=8C=99=E5=8B=95=E3=82=92?= =?utf8?q?=E4=BB=A5=E5=89=8D=E3=81=AE=E3=81=AB=E6=88=BB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Core/EditView.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Core/EditView.cs b/Core/EditView.cs index 35dc3de..ee52526 100644 --- a/Core/EditView.cs +++ b/Core/EditView.cs @@ -501,7 +501,7 @@ namespace FooEditEngine /// /// 指定した座標の一番近くにあるTextPointを取得する /// - /// テキストエリアを左上とする相対位置 + /// ビューエリアを左上とする相対位置 /// 探索範囲 /// レイアウトラインを指し示すTextPoint public TextPoint GetTextPointFromPostion(Point p,TextPointSearchRange searchRange = TextPointSearchRange.TextAreaOnly) @@ -767,13 +767,12 @@ namespace FooEditEngine } else if(caret_y >= alignedHeight) { - double caretYFromTextArea = alignedHeight; - var newsrc = this.GetNearstRowAndOffsetY(tp.row, -caretYFromTextArea); + var newsrc = this.GetNearstRowAndOffsetY(tp.row, -(alignedHeight - relPoint.Y)); if(newsrc == null) this.Document.Src = new SrcPoint(this.Src.X, tp.row, 0); else this.Document.Src = new SrcPoint(this.Src.X, newsrc.Item1, -newsrc.Item2); - y = caretYFromTextArea; + y = alignedHeight; } y += this.render.TextArea.Y; result = true; -- 2.11.0