Make themes.toHex use getColor, ensure .selectable

pull/1/head
cpsdqs 7 years ago
parent 394654099a
commit 74ce1de432
Signed by untrusted user: cpsdqs
GPG Key ID: 3F59586BB7448DD1
  1. 2
      js/term/screen.js
  2. 5
      js/term/themes.js

@ -92,7 +92,7 @@ module.exports = class TermScreen extends EventEmitter {
this.selection = {
// when false, this will prevent selection in favor of mouse events,
// though alt can be held to override it
selectable: true,
selectable: null,
// selection start and end (x, y) tuples
start: [0, 0],

@ -145,10 +145,7 @@ exports.getColor = function (i, palette = []) {
exports.toHex = function (shade, themeN) {
if (/^\d+$/.test(shade)) {
shade = +shade
if (shade < 16) shade = themes[themeN][shade]
else {
shade = exports.buildColorTable()[shade]
}
return exports.getColor(shade, themes[themeN])
}
return shade
}

Loading…
Cancel
Save