Skip to content

Commit

Permalink
Validate selmode setting (#1206)
Browse files Browse the repository at this point in the history
  • Loading branch information
joelim-work committed Apr 15, 2023
1 parent c0dfb3c commit 4dbc15e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion eval.go
Expand Up @@ -692,7 +692,13 @@ func (e *setExpr) eval(app *app, args []string) {
}
gOpts.scrolloff = n
case "selmode":
gOpts.selmode = e.val
switch e.val {
case "all", "dir":
gOpts.selmode = e.val
default:
app.ui.echoerr("selmode: value should either be 'all' or 'dir'")
return
}
case "shell":
gOpts.shell = e.val
case "shellflag":
Expand Down

0 comments on commit 4dbc15e

Please sign in to comment.