Screen length & frame length are different things

box-drawing
cpsdqs 7 years ago
parent e105344ccc
commit c7b13ddaff
Signed by untrusted user: cpsdqs
GPG Key ID: 3F59586BB7448DD1
  1. 7
      js/term/screen_parser.js

@ -249,7 +249,8 @@ module.exports = class ScreenParser {
let attrs = 0 let attrs = 0
let cell = 0 // cell index let cell = 0 // cell index
let lastChar = ' ' let lastChar = ' '
let screenLength = frameWidth * frameHeight let frameLength = frameWidth * frameHeight
let screenLength = this.screen.window.width * this.screen.window.height
if (resized) { if (resized) {
this.screen.updateSize() this.screen.updateSize()
@ -304,7 +305,7 @@ module.exports = class ScreenParser {
this.screen.screenAttrs[index] = myAttrs this.screen.screenAttrs[index] = myAttrs
} }
while (ci < strArray.length && cell < screenLength) { while (ci < strArray.length && cell < frameLength) {
let character = strArray[ci++] let character = strArray[ci++]
let charCode = character.codePointAt(0) let charCode = character.codePointAt(0)
@ -314,7 +315,7 @@ module.exports = class ScreenParser {
count = du(strArray[ci++]) count = du(strArray[ci++])
for (let j = 0; j < count; j++) { for (let j = 0; j < count; j++) {
pushCell() pushCell()
if (++cell > screenLength) break if (++cell > frameLength) break
} }
break break

Loading…
Cancel
Save