git://git.nikiroo.be
/
nikiroo-utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix bounds check
[nikiroo-utils.git]
/
src
/
jexer
/
tterminal
/
ECMA48.java
diff --git
a/src/jexer/tterminal/ECMA48.java
b/src/jexer/tterminal/ECMA48.java
index 31bb5b1573cda8d66922036a40027e117b52e83f..3702b8bc5bc64d3c9e9e454dbdb8179e464aafc0 100644
(file)
--- a/
src/jexer/tterminal/ECMA48.java
+++ b/
src/jexer/tterminal/ECMA48.java
@@
-6083,16
+6083,16
@@
public class ECMA48 implements Runnable {
// This is EOF
done = true;
} else {
// This is EOF
done = true;
} else {
- for (int i = 0; i < rc; i++) {
- int ch = 0;
- if (utf8) {
- ch = readBufferUTF8[i];
- } else {
- ch = readBuffer[i];
- }
+ // Don't step on UI events
+ synchronized (this) {
+ for (int i = 0; i < rc; i++) {
+ int ch = 0;
+ if (utf8) {
+ ch = readBufferUTF8[i];
+ } else {
+ ch = readBuffer[i];
+ }
- synchronized (this) {
- // Don't step on UI events
consume((char)ch);
}
}
consume((char)ch);
}
}
@@
-6126,6
+6126,11
@@
public class ECMA48 implements Runnable {
// SQUASH
}
// SQUASH
}
+ // Permit my enclosing UI to know that I updated.
+ if (displayListener != null) {
+ displayListener.displayChanged();
+ }
+
// System.err.println("*** run() exiting..."); System.err.flush();
}
// System.err.println("*** run() exiting..."); System.err.flush();
}