mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-13 01:47:51 +08:00
edit: Fix killLineRight
This commit is contained in:
parent
c9686c85be
commit
8460fa8b4c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user