mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 01:15:35 +00:00
widget: emit only one ChangeEvent per Editor.Layout
ChangeEvent contains no information, so emitting multiple instances per layout is pointless. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+3
-3
@@ -374,9 +374,9 @@ func (e *Editor) processKey(gtx layout.Context) {
|
|||||||
e.caret.start = e.closestPosition(combinedPos{runes: ke.Start}).runes
|
e.caret.start = e.closestPosition(combinedPos{runes: ke.Start}).runes
|
||||||
e.caret.end = e.closestPosition(combinedPos{runes: ke.End}).runes
|
e.caret.end = e.closestPosition(combinedPos{runes: ke.End}).runes
|
||||||
}
|
}
|
||||||
if e.rr.Changed() {
|
}
|
||||||
e.events = append(e.events, ChangeEvent{})
|
if e.rr.Changed() {
|
||||||
}
|
e.events = append(e.events, ChangeEvent{})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user