mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 08:25:34 +00:00
widget: fix moveLines residual x offset calculation
Commit c22138f5f broke it, this change fixes it.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -120,6 +120,14 @@ func TestEditor(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Test that moveLine applies x offsets from previous moves.
|
||||
e.SetText("long line\nshort")
|
||||
e.SetCaret(0, 0)
|
||||
e.moveEnd(selectionClear)
|
||||
e.moveLines(+1, selectionClear)
|
||||
e.moveLines(-1, selectionClear)
|
||||
assertCaret(t, e, 0, utf8.RuneCountInString("long line"), len("long line"))
|
||||
}
|
||||
|
||||
func TestEditorDimensions(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user