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

@@ -67,7 +67,7 @@ func (b *Buffer) SaveAs(filename string) error {
if b.Settings["eofnewline"].(bool) {
end := b.End()
if b.RuneAt(Loc{end.X - 1, end.Y}) != '\n' {
b.Insert(end, "\n")
b.Insert(end, []byte{'\n'})
}
}