Make cls really end up at 0,0

This commit is contained in:
Eric Bottard
2014-04-18 15:52:45 +02:00
parent bc93dddf00
commit a9da6ee7ef

View File

@@ -23,7 +23,7 @@ import org.springframework.shell.core.annotation.CliCommand;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
/** /**
* Commands related to the manipulation of the jline console * Commands related to the manipulation of the jline console.
* *
* @author Mark Pollack * @author Mark Pollack
* *
@@ -33,7 +33,7 @@ public class ConsoleCommands implements CommandMarker {
@CliCommand(value = { "cls", "clear" }, help = "Clears the console") @CliCommand(value = { "cls", "clear" }, help = "Clears the console")
public void clear() { public void clear() {
AnsiConsole.out().println(ansi().eraseScreen().cursor(0, 0)); AnsiConsole.out().print(ansi().eraseScreen().cursor(0, 0));
} }
} }