summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 {