diff --git a/eval.go b/eval.go index 6a0957c..ec30b2e 100644 --- a/eval.go +++ b/eval.go @@ -315,6 +315,11 @@ func (e *setExpr) eval(app *app, args []string) { case "timefmt": gOpts.timefmt = e.val case "truncatechar": + if runeSliceWidth([]rune(e.val)) > 1 { + app.ui.echoerr("truncatechar: value should be 1 character long") + return + } + gOpts.truncatechar = e.val default: app.ui.echoerrf("unknown option: %s", e.opt)