X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTTerminalWindow.java;h=4e0123fd7aa383a8d1aeaf4b5e693cb52d10d39d;hb=027de5ae322ef58d3bc74051d3aa20847455361a;hp=5970b6c77aff4791a389d13a7aa9a1012dbf5147;hpb=d14e2d78fa6f72df00ad84e14e0bed1d5aa090f4;p=fanfix.git diff --git a/src/jexer/TTerminalWindow.java b/src/jexer/TTerminalWindow.java index 5970b6c..4e0123f 100644 --- a/src/jexer/TTerminalWindow.java +++ b/src/jexer/TTerminalWindow.java @@ -326,10 +326,9 @@ public class TTerminalWindow extends TScrollableWindow */ @Override public void draw() { - int width = getDisplayWidth(); boolean syncEmulator = false; - if ((System.currentTimeMillis() - lastUpdateTime > 125) + if ((System.currentTimeMillis() - lastUpdateTime >= 25) && (dirty == true) ) { // Too much time has passed, draw it all. @@ -410,8 +409,7 @@ public class TTerminalWindow extends TScrollableWindow continue; } - Cell newCell = new Cell(); - newCell.setTo(ch); + Cell newCell = new Cell(ch); boolean reverse = line.isReverseColor() ^ ch.isReverse(); newCell.setReverse(false); if (reverse) { @@ -985,8 +983,7 @@ public class TTerminalWindow extends TScrollableWindow BufferedImage image; if (line.getDoubleHeight() == 1) { // Double-height top half: don't draw the underline. - Cell newCell = new Cell(); - newCell.setTo(cell); + Cell newCell = new Cell(cell); newCell.setUnderline(false); image = doubleFont.getImage(newCell, textWidth * 2, textHeight * 2, cursorBlinkVisible); @@ -997,10 +994,8 @@ public class TTerminalWindow extends TScrollableWindow // Now that we have the double-wide glyph drawn, copy the right // pieces of it to the cells. - Cell left = new Cell(); - Cell right = new Cell(); - left.setTo(cell); - right.setTo(cell); + Cell left = new Cell(cell); + Cell right = new Cell(cell); right.setChar(' '); BufferedImage leftImage = null; BufferedImage rightImage = null;