mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-29 22:27:13 +09:00
Add more descriptive error message if there is an error with gob
This commit is contained in:
@@ -83,7 +83,7 @@ func NewBuffer(txt []byte, path string) *Buffer {
|
|||||||
gob.Register(TextEvent{})
|
gob.Register(TextEvent{})
|
||||||
err = decoder.Decode(&buffer)
|
err = decoder.Decode(&buffer)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
TermMessage(err.Error())
|
TermMessage(err.Error(), "\n", "You may want to remove the files in ~/.config/micro/buffers (these files store the information for the 'saveundo' and 'savecursor' options) if this problem persists.")
|
||||||
}
|
}
|
||||||
if settings["savecursor"].(bool) {
|
if settings["savecursor"].(bool) {
|
||||||
b.Cursor = buffer.Cursor
|
b.Cursor = buffer.Cursor
|
||||||
|
|||||||
Reference in New Issue
Block a user