mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-29 22:27:13 +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:
@@ -326,10 +326,12 @@ func SetOption(option, value string) error {
|
||||
}
|
||||
}
|
||||
|
||||
if _, ok := CurView().Buf.Settings[option]; ok {
|
||||
for _, tab := range tabs {
|
||||
for _, view := range tab.views {
|
||||
SetLocalOption(option, value, view)
|
||||
if len(tabs) != 0 {
|
||||
if _, ok := CurView().Buf.Settings[option]; ok {
|
||||
for _, tab := range tabs {
|
||||
for _, view := range tab.views {
|
||||
SetLocalOption(option, value, view)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user