add user defined options (#865)
This commit is contained in:
1 parent
62621736b3
commit
a2fed6d16e
6 files changed
+36
-1
No files matched your search
@@ -442,7 +442,12 @@ func (e *setExpr) eval(app *app, args []string) {
|
||||
|
||||
gOpts.truncatechar = e.val
|
||||
default:
|
||||
app.ui.echoerrf("unknown option: %s", e.opt)
|
||||
// any key with the prefix user_ is accepted as a user defined option
|
||||
if strings.HasPrefix(e.opt, "user_") {
|
||||
gOpts.user[e.opt[5:]] = e.val
|
||||
} else {
|
||||
app.ui.echoerrf("unknown option: %s", e.opt)
|
||||
}
|
||||
return
|
||||
}
|
||||
app.ui.loadFileInfo(app.nav)
|
||||
|
||||
Reference in new issue
Block a user