mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-30 06:37:14 +09:00
If the history file is unreadable or unparseable, Messenger.history remained nil, causing a panic on read.
Now in that case, we temporarily disable saving history and initialize history to empty, instead of nil
This commit is contained in:
@@ -501,6 +501,8 @@ func (m *Messenger) LoadHistory() {
|
||||
|
||||
if err != nil {
|
||||
m.Error("Error loading history:", err)
|
||||
SetOption("savehistory", "false")
|
||||
m.history = make(map[string][]string)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user