Revert "Use byte slice for insert"

This reverts commit 0c844c2f5b.
This commit is contained in:
Zachary Yedidia
2019-01-16 22:32:33 -05:00
parent 069f7d20bc
commit 9336e09532
8 changed files with 29 additions and 25 deletions

View File

@@ -262,9 +262,9 @@ func (h *BufHandler) DoRuneInsert(r rune) {
if h.isOverwriteMode {
next := c.Loc
next.X++
h.Buf.Replace(c.Loc, next, []byte{byte(r)})
h.Buf.Replace(c.Loc, next, string(r))
} else {
h.Buf.Insert(c.Loc, []byte{byte(r)})
h.Buf.Insert(c.Loc, string(r))
}
}
}