mirror of
https://github.com/Hopiu/micro.git
synced 2026-03-24 09:50:24 +00:00
Properly close unmodified buffers on sigterm
This commit is contained in:
parent
7e19b68426
commit
548bb98641
1 changed files with 7 additions and 0 deletions
|
|
@ -276,6 +276,13 @@ func main() {
|
|||
|
||||
go func() {
|
||||
<-c
|
||||
|
||||
for _, b := range buffer.OpenBuffers {
|
||||
if !b.Modified() {
|
||||
b.Fini()
|
||||
}
|
||||
}
|
||||
|
||||
if screen.Screen != nil {
|
||||
screen.Screen.Fini()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue