From a0b6bb5a13648760c3a69d94030e5b1b63b9db14 Mon Sep 17 00:00:00 2001 From: Joe Lim <50560759+joelim-work@users.noreply.github.com> Date: Fri, 12 May 2023 14:12:19 +1000 Subject: [PATCH] Fix count when parsing `bottom` command --- parse.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/parse.go b/parse.go index e6abeb00..72cbdbcf 100644 --- a/parse.go +++ b/parse.go @@ -228,7 +228,11 @@ func (p *parser) parseExpr() expr { s.scan() - result = &callExpr{name, args, 1} + count := 1 + if name == "top" || name == "bottom" { + count = 0 + } + result = &callExpr{name, args, count} } case tokenColon: s.scan()