mirror of
https://github.com/rwinkhart/MUTN.git
synced 2026-08-29 13:26:35 -04:00
Handle cases where the user initialized libmutton in a different client and has no text editor specified (also allow setting a text editor in the tweak menu)
This commit is contained in:
+4
-1
@@ -88,7 +88,10 @@ func editNote(baseNote []string) ([]string, bool) {
|
||||
}(tempFile.Name())
|
||||
|
||||
// fetch the user's text editor
|
||||
editorCfg, _ := cfg.ParseConfig([][2]string{{"MUTN", "textEditor"}})
|
||||
editorCfg, err := cfg.ParseConfig([][2]string{{"MUTN", "textEditor"}})
|
||||
if err != nil {
|
||||
other.PrintError("Failed to retrieve text editor from libmutton.ini\n\nPlease specify one with \"mutn tweak\"", back.ErrorRead)
|
||||
}
|
||||
editor := editorCfg[0]
|
||||
|
||||
// write baseNote to tempFile (if it is not empty)
|
||||
|
||||
Reference in New Issue
Block a user