Use byte slice for insert

This commit is contained in:
Zachary Yedidia
2019-01-14 22:29:24 -05:00
parent dcd5f4e6e1
commit 0c844c2f5b
7 changed files with 22 additions and 22 deletions

View File

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