diff --git a/Userland/Shell/Parser.cpp b/Userland/Shell/Parser.cpp index d1e422f6d83..699de495aeb 100644 --- a/Userland/Shell/Parser.cpp +++ b/Userland/Shell/Parser.cpp @@ -1867,9 +1867,9 @@ StringView Parser::consume_while(Function condition) bool Parser::next_is(const StringView& next) { - auto start = push_start(); + auto start = current_position(); auto res = expect(next); - restore_to(*start); + restore_to(start.offset, start.line); return res; }