edit: Fix killLineRight

This commit is contained in:
Cheer Xiao 2014-03-10 00:28:43 +08:00
parent c9686c85be
commit 8460fa8b4c

View File

@ -97,6 +97,8 @@ func killLineRight(ed *Editor, k Key) *leReturn {
eol := strings.IndexRune(ed.line[ed.dot:], '\n')
if eol == -1 {
eol = len(ed.line)
} else {
eol += ed.dot
}
ed.line = ed.line[:ed.dot] + ed.line[eol:]
return nil