Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added additional escape sequences defined in ECMA-48. #21

Merged
merged 1 commit into from
Apr 6, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions jansi/src/main/java/org/fusesource/jansi/Ansi.java
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,11 @@ public Ansi cursor(int x, int y) {
return this;
}

@Override
public Ansi cursorToColumn(int x) {
return this;
}

@Override
public Ansi cursorUp(int y) {
return this;
Expand All @@ -237,6 +242,26 @@ public Ansi cursorLeft(int x) {
return this;
}

@Override
public Ansi cursorDownLine() {
return this;
}

@Override
public Ansi cursorDownLine(final int n) {
return this;
}

@Override
public Ansi cursorUpLine() {
return this;
}

@Override
public Ansi cursorUpLine(final int n) {
return this;
}

@Override
public Ansi eraseScreen() {
return this;
Expand Down Expand Up @@ -339,6 +364,10 @@ public Ansi cursor(final int x, final int y) {
return appendEscapeSequence('H', x, y);
}

public Ansi cursorToColumn(final int x) {
return appendEscapeSequence('G', x);
}

public Ansi cursorUp(final int y) {
return appendEscapeSequence('A', y);
}
Expand All @@ -355,6 +384,22 @@ public Ansi cursorLeft(final int x) {
return appendEscapeSequence('D', x);
}

public Ansi cursorDownLine() {
return appendEscapeSequence('E');
}

public Ansi cursorDownLine(final int n) {
return appendEscapeSequence('E', n);
}

public Ansi cursorUpLine() {
return appendEscapeSequence('F');
}

public Ansi cursorUpLine(final int n) {
return appendEscapeSequence('F', n);
}

public Ansi eraseScreen() {
return appendEscapeSequence('J',Erase.ALL.value());
}
Expand Down