mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
widget: reset Editor x offset on mouse initiated caret movement
The caret x-offset tracks residual horizontal offset for arrow key movements. Caret movement by the mouse should reset the residual. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -441,6 +441,7 @@ func (e *Editor) moveCoord(pos image.Point) {
|
||||
carLine++
|
||||
}
|
||||
x := fixed.I(pos.X + e.scrollOff.X)
|
||||
e.carXOff = 0
|
||||
e.moveToLine(x, carLine)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user