mirror of
https://github.com/rwinkhart/MUTN.git
synced 2026-08-28 04:46:41 -04:00
Sync with latest libmutton development version (new config file format)
This commit is contained in:
+8
-3
@@ -95,11 +95,16 @@ func editNote(baseNote []string) ([]string, bool) {
|
||||
}(tempFile.Name())
|
||||
|
||||
// fetch the user's text editor
|
||||
editorCfg, err := cfg.ParseConfig([][2]string{{"MUTN", "textEditor"}})
|
||||
cfg, err := cfg.LoadConfig()
|
||||
if err != nil {
|
||||
other.PrintError("Failed to retrieve text editor from libmutton.ini\n\nPlease specify one with \"mutn tweak\"", back.ErrorRead)
|
||||
other.PrintError("Failed to load libmuttoncfg.json: "+err.Error(), back.ErrorRead)
|
||||
}
|
||||
var editor string
|
||||
if value, exists := (*cfg.ThirdParty)["mutnTextEditor"]; !exists {
|
||||
other.PrintError("Failed to retrieve text editor from libmuttoncfg.json\n\nPlease specify one with \"mutn tweak\"", back.ErrorRead)
|
||||
} else {
|
||||
editor = value.(string)
|
||||
}
|
||||
editor := editorCfg[0]
|
||||
|
||||
// write baseNote to tempFile (if it is not empty)
|
||||
baseNoteLen := len(baseNote)
|
||||
|
||||
Reference in New Issue
Block a user