From 8dc20d387df1c9344e324d6b8a0d0d7939a47940 Mon Sep 17 00:00:00 2001 From: Kevin Lamonte Date: Fri, 13 Mar 2015 22:46:19 -0400 Subject: [PATCH] Fix excess redraws --- src/jexer/io/ECMA48Screen.java | 6 +++--- src/jexer/io/ECMA48Terminal.java | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/jexer/io/ECMA48Screen.java b/src/jexer/io/ECMA48Screen.java index 15dee501..659d132a 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 064c4ec9..b608a69f 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) { -- 2.27.0