mirror of https://github.com/jroimartin/gocui.git
Minor refactoring
This commit is contained in:
parent
e009f09eb8
commit
37e2387e4a
4
edit.go
4
edit.go
|
@ -79,12 +79,14 @@ func (v *View) editDelete(back bool) {
|
||||||
v.deleteRune(v.cx-1, v.cy)
|
v.deleteRune(v.cx-1, v.cy)
|
||||||
v.moveCursor(-1, 0, true)
|
v.moveCursor(-1, 0, true)
|
||||||
}
|
}
|
||||||
} else if x == len(v.viewLines[y].line) { // end of the line
|
} else {
|
||||||
|
if x == len(v.viewLines[y].line) { // end of the line
|
||||||
v.mergeLines(v.cy)
|
v.mergeLines(v.cy)
|
||||||
} else { // middle of the line
|
} else { // middle of the line
|
||||||
v.deleteRune(v.cx, v.cy)
|
v.deleteRune(v.cx, v.cy)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// editNewLine inserts a new line under the cursor.
|
// editNewLine inserts a new line under the cursor.
|
||||||
func (v *View) editNewLine() {
|
func (v *View) editNewLine() {
|
||||||
|
|
Loading…
Reference in New Issue