Skip to content

Commit

Permalink
edit-and-execute-command: ensure commandsBuffer is empty when done
Browse files Browse the repository at this point in the history
  • Loading branch information
mattirn committed Oct 16, 2019
1 parent 621850f commit e95b2c1
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,10 @@ public String readLine(String prompt, String rightPrompt, MaskingCallback maskin
cmd += commandsBuffer.remove(0);
} catch (SyntaxError e) {
done = true;
} catch (Exception e) {
throw new IllegalArgumentException(e.getMessage());
} finally {
commandsBuffer.clear();
}
} while (!done);
AttributedStringBuilder sb = new AttributedStringBuilder();
Expand Down

0 comments on commit e95b2c1

Please sign in to comment.