Fix reverse video having no effect

webgl-renderer
cpsdqs 7 years ago
parent e3b279866c
commit cdfcb6ba9a
Signed by untrusted user: cpsdqs
GPG Key ID: 3F59586BB7448DD1
  1. 1
      js/term/screen.js
  2. 3
      js/term/screen_renderer.js

@ -282,6 +282,7 @@ module.exports = class TermScreen extends EventEmitter {
screenAttrs: this.screenAttrs,
cursor: this.cursor,
statusScreen: this.window.statusScreen,
reverseVideo: this.reverseVideo,
hasBlinkingCells: !!this.blinkingCellCount
})
}

@ -61,6 +61,7 @@ module.exports = class CanvasRenderer extends EventEmitter {
this.screenAttrs = []
this.screenSelection = []
this.cursor = {}
this.reverseVideo = false
this.hasBlinkingCells = false
this.statusScreen = null
@ -540,7 +541,7 @@ module.exports = class CanvasRenderer extends EventEmitter {
}
if (attrs & ATTR_INVERSE) [fg, bg] = [bg, fg] // swap - reversed character colors
if (this.screen.reverseVideo) [fg, bg] = [bg, fg] // swap - reversed all screen
if (this.reverseVideo) [fg, bg] = [bg, fg] // swap - reversed all screen
if (attrs & ATTR_BLINK && !this.blinkStyleOn) {
// blinking is enabled and blink style is off

Loading…
Cancel
Save