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 = { this.selection = {
// when false, this will prevent selection in favor of mouse events, // when false, this will prevent selection in favor of mouse events,
// though alt can be held to override it // though alt can be held to override it
selectable: true, selectable: null,
// selection start and end (x, y) tuples // selection start and end (x, y) tuples
start: [0, 0], start: [0, 0],

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

Loading…
Cancel
Save