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