From dfe4ff020039ea4d5ac56efb87a1781a1453c19a Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Tue, 17 Mar 2026 17:10:03 +0100 Subject: [PATCH] app,io/key: go fmt Signed-off-by: Elias Naur --- app/os_js.go | 6 +++--- io/key/mod.go | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/os_js.go b/app/os_js.go index 5f3d8557..343f38b7 100644 --- a/app/os_js.go +++ b/app/os_js.go @@ -427,11 +427,11 @@ func (w *window) addEventListeners() { // Safari sends "insertReplacementText" for autocorrect, but the cursor is at the end of the word, so we need to find the word start. insertLen := utf8.RuneCountInString(data) wordStart := absStart - + if absStart > snippetStart { relPos := absStart - snippetStart snippetRunes := []rune(st.Snippet.Text) - + for i := relPos - 1; i >= 0; i-- { if i >= len(snippetRunes) { continue @@ -443,7 +443,7 @@ func (w *window) addEventListeners() { wordStart = snippetStart + i } } - + replaceRange := key.Range{Start: wordStart, End: absStart} w.w.EditorReplace(replaceRange, data) diff --git a/io/key/mod.go b/io/key/mod.go index f52b8b18..3571b7c7 100644 --- a/io/key/mod.go +++ b/io/key/mod.go @@ -1,6 +1,7 @@ // SPDX-License-Identifier: Unlicense OR MIT //go:build !darwin && !js + package key // ModShortcut is the platform's shortcut modifier, usually the ctrl