mirror of
https://github.com/Hopiu/micro.git
synced 2026-04-07 08:20:59 +00:00
parent
faec861081
commit
aef75f9b83
1 changed files with 3 additions and 0 deletions
|
|
@ -427,6 +427,9 @@ func (v *View) MoveToMouseClick(x, y int) {
|
|||
|
||||
x, y = v.GetSoftWrapLocation(x, y)
|
||||
// x = v.Cursor.GetCharPosInLine(y, x)
|
||||
if y > v.Buf.NumLines {
|
||||
y = v.Buf.NumLines - 1
|
||||
}
|
||||
if x > Count(v.Buf.Line(y)) {
|
||||
x = Count(v.Buf.Line(y))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue