Skip to content
Browse files

Substitue 0 rows/columns with the default row/column values

Fixes a bug with Heroku, which reports 0 columns/rows for its terminal
  • Loading branch information...
1 parent 77c068a commit eece34debfb8ee6898579b23b76635b3f9c0f289 @carlhoerberg carlhoerberg committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/main/java/jline/UnixTerminal.java
View
4 src/main/java/jline/UnixTerminal.java
@@ -200,7 +200,7 @@ public int getTerminalWidth() {
} catch (Exception e) {
}
- if (val == -1) {
+ if (val <= 0) {
val = 80;
}
@@ -223,7 +223,7 @@ public int getTerminalHeight() {
} catch (Exception e) {
}
- if (val == -1) {
+ if (val <= 0) {
val = 24;
}

0 comments on commit eece34d

Please sign in to comment.
Something went wrong with that request. Please try again.