mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-29 06:12:35 +09:00
Use byte slice for insert
This commit is contained in:
@@ -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)})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user