Reset line suppression when a command is received.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 27 Jan 2014 05:27:27 +0000 (06:27 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 27 Jan 2014 05:27:27 +0000 (06:27 +0100)
src/main/java/net/pterodactylus/xdcc/ui/stdin/CommandReader.java

index e9bcc3c..016c9d0 100644 (file)
@@ -63,7 +63,7 @@ public class CommandReader extends AbstractExecutionThreadService {
        private final BufferedReader reader;
 
        /** The writer to write the results to. */
-       private final Writer writer;
+       private final DuplicateLineSuppressingWriter writer;
        private final Collection<Download> failedDownloads;
 
        /**
@@ -110,6 +110,7 @@ public class CommandReader extends AbstractExecutionThreadService {
                        if (line.equals("")) {
                                line = lastLine;
                        }
+                       writer.reset();
                        String[] words = line.split(" +");
                        String commandName = words[0];
                        Collection<Command> eligibleCommands = findEligibleCommands(commandName);