From 126fcb57b29dd0157cf2dd42da24dc0a047ec88c Mon Sep 17 00:00:00 2001 From: Charlie Stanton Date: Sun, 21 Apr 2024 17:52:08 +0100 Subject: Fix bug where next command doesn't consume the input --- main/command.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'main/command.go') diff --git a/main/command.go b/main/command.go index 736dce5..38e1c95 100644 --- a/main/command.go +++ b/main/command.go @@ -79,6 +79,7 @@ func (cmd SubstituteNextCommand) exec(state *ProgramState) { if notOk { state.pc++ } else { + state.Read() state.prevStart = item.PrevStart state.start = item.Start state.end = item.End @@ -105,6 +106,7 @@ func (cmd SubstituteAppendNextCommand) exec(state *ProgramState) { if notOk { state.pc++ } else { + state.Read() state.prevStart = item.PrevStart state.start = item.Start state.end = item.End -- cgit v1.2.3