Fixed commands with a trailing whitespace

This commit is contained in:
Nathan Adams
2017-11-08 09:20:48 +01:00
parent 2c39925cda
commit 6e61fef225
3 changed files with 14 additions and 2 deletions
@@ -153,7 +153,9 @@ public class CommandDispatcher<S> {
context.withCommand(child.getCommand());
if (reader.canRead()) {
reader.skip();
if (reader.canRead(2)) {
reader.skip();
}
if (child.getRedirect() != null) {
final CommandContextBuilder<S> childContext = new CommandContextBuilder<>(this, source, reader.getCursor());
childContext.withNode(child.getRedirect(), new StringRange(reader.getCursor(), reader.getCursor()));