mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-30 06:37:14 +09:00
line_array insert for eofnewline and make default
Makes the `eofnewline` option enabled by default. Fixes #1525
This commit is contained in:
@@ -112,7 +112,7 @@ func (b *Buffer) saveToFile(filename string, withSudo bool) error {
|
||||
if b.Settings["eofnewline"].(bool) {
|
||||
end := b.End()
|
||||
if b.RuneAt(Loc{end.X, end.Y}) != '\n' {
|
||||
b.Insert(end, "\n")
|
||||
b.insert(end, []byte{'\n'})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user