Skip to content

Commit

Permalink
Merge branch 'mattirn-status-hardReset'
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed May 6, 2019
2 parents 795f2ea + be0be9e commit fd79852
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1026,8 +1026,13 @@ protected String finishBuffer() {

protected void handleSignal(Signal signal) {
if (signal == Signal.WINCH) {
Status status = Status.getStatus(terminal, false);
if (status != null) {
status.hardReset();
}
size.copy(terminal.getBufferSize());
display.resize(size.getRows(), size.getColumns());
redrawLine();
redisplay();
}
else if (signal == Signal.CONT) {
Expand Down
6 changes: 6 additions & 0 deletions terminal/src/main/java/org/jline/utils/Status.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ public void reset() {
this.force = true;
}

public void hardReset() {
List<AttributedString> lines = new ArrayList<>(oldLines);
update(null);
update(lines);
}

public void redraw() {
update(oldLines);
}
Expand Down

0 comments on commit fd79852

Please sign in to comment.