mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
widget: don't adjust selection in Editor.makeValid
Only rune positions are tracked for carets, and they only need adjusting when changing Editor content, not just for re-layout. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -240,8 +240,6 @@ func (e *Editor) makeValid() {
|
||||
return
|
||||
}
|
||||
e.lines, e.dims = e.layoutText(e.shaper)
|
||||
e.caret.start = e.closestPosition(combinedPos{runes: e.caret.start}).runes
|
||||
e.caret.end = e.closestPosition(combinedPos{runes: e.caret.end}).runes
|
||||
e.valid = true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user