From: Kevin Lamonte Date: Sat, 14 Mar 2015 02:46:19 +0000 (-0400) Subject: Fix excess redraws X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=8dc20d387df1c9344e324d6b8a0d0d7939a47940;p=fanfix-jexer.git Fix excess redraws --- diff --git a/src/jexer/io/ECMA48Screen.java b/src/jexer/io/ECMA48Screen.java index 15dee50..659d132 100644 --- a/src/jexer/io/ECMA48Screen.java +++ b/src/jexer/io/ECMA48Screen.java @@ -91,7 +91,7 @@ public class ECMA48Screen extends Screen { Cell lCell = logical[x][y]; Cell pCell = physical[x][y]; - if ((lCell != pCell) || reallyCleared) { + if (!lCell.equals(pCell) || reallyCleared) { if (debugToStderr) { System.err.printf("\n--\n"); @@ -222,10 +222,10 @@ public class ECMA48Screen extends Screen { lastX = x; lastAttr.setTo(lCell); - // Physical is always updatesd + // Physical is always updated physical[x][y].setTo(lCell); - } // if ((lCell != pCell) || (reallyCleared == true)) + } // if (!lCell.equals(pCell) || (reallyCleared == true)) } // for (int x = 0; x < width; x++) } diff --git a/src/jexer/io/ECMA48Terminal.java b/src/jexer/io/ECMA48Terminal.java index 064c4ec..b608a69 100644 --- a/src/jexer/io/ECMA48Terminal.java +++ b/src/jexer/io/ECMA48Terminal.java @@ -1445,8 +1445,8 @@ public class ECMA48Terminal implements Runnable { } } } else { - // Wait 5 millis for more data - Thread.sleep(5); + // Wait 10 millis for more data + Thread.sleep(10); } // System.err.println("end while loop"); System.err.flush(); } catch (InterruptedException e) {