Sync with latest libmutton development version (new config file format)

This commit is contained in:
2025-12-17 00:41:44 -05:00
parent fb70b38dc3
commit 48ecf7cf83
4 changed files with 16 additions and 11 deletions
+5 -2
View File
@@ -198,7 +198,7 @@ func main() {
}
case "init":
err := core.LibmuttonInit(front.Input,
[][3]string{{"MUTN", "textEditor", getTextEditorInput()}},
map[string]any{"mutnTextEditor": getTextEditorInput()},
confirmRCWPassword("new"), false, false)
if err != nil {
other.PrintError("Initialization failed: "+err.Error(), 0)
@@ -226,7 +226,10 @@ func main() {
}
fmt.Println("\nRe-encryption complete.")
case 3:
err := cfg.WriteConfig([][3]string{{"MUTN", "textEditor", getTextEditorInput()}}, nil, true)
newCfg := &cfg.CfgT{}
newThirdPartyCfg := map[string]any{"mutnTextEditor": getTextEditorInput()}
newCfg.ThirdParty = &newThirdPartyCfg
err := cfg.WriteConfig(newCfg, true)
if err != nil {
other.PrintError("Failed to set text editor: "+err.Error(), back.ErrorWrite)
}