mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 18:05:35 +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
|
return
|
||||||
}
|
}
|
||||||
e.lines, e.dims = e.layoutText(e.shaper)
|
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
|
e.valid = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user