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,11 +79,13 @@ 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.
|
||||||
|
|
Loading…
Reference in New Issue