From bace7062406ff1d1708576a877108ea5be76d40a Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Sat, 12 Feb 2022 23:57:40 +0100 Subject: [PATCH] app: remove redundant if check EditorStateChanged is only called when the old and new states differ. Signed-off-by: Elias Naur --- app/os_macos.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/os_macos.go b/app/os_macos.go index aa337a96..630d0b16 100644 --- a/app/os_macos.go +++ b/app/os_macos.go @@ -363,10 +363,8 @@ func (w *window) SetCursor(name pointer.CursorName) { } func (w *window) EditorStateChanged(old, new editorState) { - if old != new { - C.discardMarkedText(w.view) - w.w.SetComposingRegion(key.Range{Start: -1, End: -1}) - } + C.discardMarkedText(w.view) + w.w.SetComposingRegion(key.Range{Start: -1, End: -1}) } func (w *window) ShowTextInput(show bool) {}