git://git.nikiroo.be
/
fanfix.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4b7ac25
)
#54 fix crash
author
Kevin Lamonte
<kevin.lamonte@gmail.com>
Wed, 28 Aug 2019 00:54:31 +0000
(19:54 -0500)
committer
Kevin Lamonte
<kevin.lamonte@gmail.com>
Wed, 28 Aug 2019 00:54:31 +0000
(19:54 -0500)
src/jexer/TProgressBar.java
patch
|
blob
|
blame
|
history
diff --git
a/src/jexer/TProgressBar.java
b/src/jexer/TProgressBar.java
index 6ed5ccf752dbb8553bf7308be4165c165f6a8b43..38f03373b7c8d5d08f323f0e56fa34bac1516048 100644
(file)
--- a/
src/jexer/TProgressBar.java
+++ b/
src/jexer/TProgressBar.java
@@
-123,6
+123,12
@@
public class TProgressBar extends TWidget {
*/
@Override
public void draw() {
+
+ if (getWidth() <= 2) {
+ // Bail out, we are too narrow to draw anything.
+ return;
+ }
+
CellAttributes completeColor = getTheme().getColor("tprogressbar.complete");
CellAttributes incompleteColor = getTheme().getColor("tprogressbar.incomplete");