Minor refactoring

This commit is contained in:
Roi Martin 2015-02-23 11:09:31 +01:00
parent e009f09eb8
commit 37e2387e4a
1 changed files with 6 additions and 4 deletions

View File

@ -79,12 +79,14 @@ func (v *View) editDelete(back bool) {
v.deleteRune(v.cx-1, v.cy)
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)
} else { // middle of the line
v.deleteRune(v.cx, v.cy)
}
}
}
// editNewLine inserts a new line under the cursor.
func (v *View) editNewLine() {