mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-17 22:37:10 +09:00
Improvements for softwrap mouse support
This commit is contained in:
@@ -283,6 +283,7 @@ func (v *View) VSplit(buf *Buffer) bool {
|
||||
|
||||
func (v *View) GetSoftWrapLocation(vx, vy int) (int, int) {
|
||||
if !v.Buf.Settings["softwrap"].(bool) {
|
||||
vx = v.Cursor.GetCharPosInLine(vy, vx)
|
||||
return vx, vy
|
||||
}
|
||||
|
||||
@@ -308,6 +309,9 @@ func (v *View) GetSoftWrapLocation(vx, vy int) (int, int) {
|
||||
screenX++
|
||||
colN++
|
||||
}
|
||||
if screenY == vy {
|
||||
return colN, lineN
|
||||
}
|
||||
screenX = 0
|
||||
screenY++
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user