This commit is contained in:
Gokcehan 2020-07-20 00:44:37 +03:00
parent f8daa60b31
commit a6544757db

View File

@ -233,7 +233,7 @@ func (e *setExpr) eval(app *app, args []string) {
toks := strings.Split(e.val, ":") toks := strings.Split(e.val, ":")
for _, s := range toks { for _, s := range toks {
if s == "" { if s == "" {
app.ui.echoerrf("hiddenfiles: glob should be non-empty") app.ui.echoerr("hiddenfiles: glob should be non-empty")
return return
} }
_, err := filepath.Match(s, "a") _, err := filepath.Match(s, "a")
@ -315,8 +315,8 @@ func (e *setExpr) eval(app *app, args []string) {
case "timefmt": case "timefmt":
gOpts.timefmt = e.val gOpts.timefmt = e.val
case "truncatechar": case "truncatechar":
if runeSliceWidth([]rune(e.val)) > 1 { if runeSliceWidth([]rune(e.val)) != 1 {
app.ui.echoerr("truncatechar: value should be 1 character long") app.ui.echoerr("truncatechar: value should be a single character")
return return
} }