Validate selmode setting (#1206)

This commit is contained in:
Joe Lim authored and GitHub committed 2023-04-15 19:52:37 +03:00
1 parent c0dfb3c4f5
commit 4dbc15e4b0
1 file changed
+7 -1
+7 -1
View File
@@ -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":