noti = 0;
- double totalHeight = this.LayoutLines.Count * this.render.emSize.Height;
+ double totalHeight = this.LayoutLines.Count * this.render.emSize.Height - this.render.TextArea.Height;
if (total.Y > totalHeight)
- total.Y = totalHeight - this.render.TextArea.Height;
+ total.Y = totalHeight;
if (total.Y < 0)
total.Y = 0;
if (total.X < 0)
row = 0; //0の時だけは切り上げると困るので何もしない
if (row < 0)
return true;
- if (row > this.LayoutLines.Count - 1)
- return true;
+ int totalRow = this.LayoutLines.Count - 1 - this.LineCountOnScreen;
+ if (row > totalRow)
+ row = totalRow;
this.Document.Src = new SrcPoint(total.X, row, total.Y);
this.SrcChanged(this, null);