From: Nicolai Søborg Date: Sat, 17 Dec 2016 23:27:06 +0000 (+0100) Subject: Fix: mouse clicking with softwrap X-Git-Tag: v1.1.4~26^2 X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=37ae99ccd9b7b3a658a2e773af74ca08c88c0d07;p=micro.git Fix: mouse clicking with softwrap When clicking on a long line with softwrap turned on, the cursor will show up in the wrong location (`screenY` will be wrong in `GetSoftWrapLocation`). This seems to fix it. --- diff --git a/cmd/micro/view.go b/cmd/micro/view.go index 80ca4942..269acd43 100644 --- a/cmd/micro/view.go +++ b/cmd/micro/view.go @@ -418,9 +418,6 @@ func (v *View) MoveToMouseClick(x, y int) { v.ScrollDown(1) y = v.Height + v.Topline - 1 } - if y >= v.Buf.NumLines { - y = v.Buf.NumLines - 1 - } if y < 0 { y = 0 }