app: remove redundant if check

EditorStateChanged is only called when the old and new states
differ.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2022-02-12 23:57:40 +01:00
parent 216f2c3295
commit bace706240
+2 -4
View File
@@ -363,10 +363,8 @@ func (w *window) SetCursor(name pointer.CursorName) {
} }
func (w *window) EditorStateChanged(old, new editorState) { func (w *window) EditorStateChanged(old, new editorState) {
if old != new { C.discardMarkedText(w.view)
C.discardMarkedText(w.view) w.w.SetComposingRegion(key.Range{Start: -1, End: -1})
w.w.SetComposingRegion(key.Range{Start: -1, End: -1})
}
} }
func (w *window) ShowTextInput(show bool) {} func (w *window) ShowTextInput(show bool) {}