commit d4de0b8

Hubert Hirtz  ·  2021-05-11 11:39:33 +0000 UTC
parent eaf823d
go fmt
1 files changed,  +2, -3
+2, -3
 1@@ -128,7 +128,7 @@ func (e *Editor) RemWord() (ok bool) {
 2 	// Hello world|
 3 	// Hello |
 4 	// |
 5-	for line[e.cursorIdx - 1] == ' ' {
 6+	for line[e.cursorIdx-1] == ' ' {
 7 		e.remRuneAt(e.cursorIdx - 1)
 8 		e.Left()
 9 	}
10@@ -145,7 +145,6 @@ func (e *Editor) RemWord() (ok bool) {
11 	return
12 }
13 
14-
15 func (e *Editor) Flush() (content string) {
16 	content = string(e.text[e.lineIdx])
17 	if len(e.text[len(e.text)-1]) == 0 {
18@@ -215,7 +214,7 @@ func (e *Editor) LeftWord() {
19 
20 	line := e.text[e.lineIdx]
21 
22-	for line[e.cursorIdx - 1] == ' ' {
23+	for line[e.cursorIdx-1] == ' ' {
24 		e.Left()
25 	}
26 	for i := e.cursorIdx - 1; i >= 0 && line[i] != ' '; i -= 1 {