summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHubert Hirtz <hubert@hirtz.pm>2021-05-11 13:39:33 +0200
committerHubert Hirtz <hubert@hirtz.pm>2021-05-11 13:39:33 +0200
commitd4de0b8dd08f6e034111627049361c8add1bf5db (patch)
treef9ab83a23ef92b2da6aa801e81131341fa1be486
parentDon't look for nor execute sh when on-highlight is empty (diff)
go fmt
-rw-r--r--ui/editor.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/ui/editor.go b/ui/editor.go
index a36fb1a..6cbc6d6 100644
--- a/ui/editor.go
+++ b/ui/editor.go
@@ -128,7 +128,7 @@ func (e *Editor) RemWord() (ok bool) {
// Hello world|
// Hello |
// |
- for line[e.cursorIdx - 1] == ' ' {
+ for line[e.cursorIdx-1] == ' ' {
e.remRuneAt(e.cursorIdx - 1)
e.Left()
}
@@ -145,7 +145,6 @@ func (e *Editor) RemWord() (ok bool) {
return
}
-
func (e *Editor) Flush() (content string) {
content = string(e.text[e.lineIdx])
if len(e.text[len(e.text)-1]) == 0 {
@@ -215,7 +214,7 @@ func (e *Editor) LeftWord() {
line := e.text[e.lineIdx]
- for line[e.cursorIdx - 1] == ' ' {
+ for line[e.cursorIdx-1] == ' ' {
e.Left()
}
for i := e.cursorIdx - 1; i >= 0 && line[i] != ' '; i -= 1 {