aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/c_defs.go3
-rw-r--r--src/c_init.go2
-rw-r--r--src/i_events.go1
3 files changed, 5 insertions, 1 deletions
diff --git a/src/c_defs.go b/src/c_defs.go
index a096e52..c54232e 100644
--- a/src/c_defs.go
+++ b/src/c_defs.go
@@ -43,7 +43,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* hardflip: src/c_defs.go
- * Thu Feb 08 14:30:35 2024
+ * Tue Feb 13 17:59:26 2024
* Joe
*
* constants
@@ -106,5 +106,6 @@ var DEFAULT_OPTS = HardOpts{
"",
false,
"",
+ "",
}
diff --git a/src/c_init.go b/src/c_init.go
index beeb80d..57f8b19 100644
--- a/src/c_init.go
+++ b/src/c_init.go
@@ -64,6 +64,7 @@ type HardOpts struct {
GPG string `yaml:"gpg"`
Perc bool `yaml:"percent"`
Term string `yaml:"terminal"`
+ file string
}
// this function recurses into the specified root directory in order to load
@@ -161,6 +162,7 @@ func c_get_options(dir string, load_err *[]error) HardOpts {
return DEFAULT_OPTS
}
opts, err := c_parse_opts(file)
+ opts.file = file
if err != nil {
*load_err = append(*load_err, err)
return DEFAULT_OPTS
diff --git a/src/i_events.go b/src/i_events.go
index 38d0643..ae7bcab 100644
--- a/src/i_events.go
+++ b/src/i_events.go
@@ -361,6 +361,7 @@ func i_events(data *HardData) {
} else {
if event.Rune() == 'y' {
ui.mode = NORMAL_MODE
+ c_write_options(data.opts.file, data.opts, &data.load_err)
} else if event.Rune() == 'n' {
data.opts.GPG = ""
}