diff --git a/core/art.js b/core/art.js index 22408cc9..0e283218 100644 --- a/core/art.js +++ b/core/art.js @@ -49,7 +49,7 @@ function getFontNameFromSAUCE(sauce) { function sliceAtEOF(data, eofMarker) { let eof = data.length; const stopPos = Math.max(data.length - (256), 0); // 256 = 2 * sizeof(SAUCE) - + for(let i = eof - 1; i > stopPos; i--) { if(eofMarker === data[i]) { eof = i; @@ -256,16 +256,17 @@ function display(client, art, options, cb) { let mciMap; const mciCprQueue = []; let artHash; + let mciMapFromCache; function completed() { if(cprListener) { client.removeListener('cursor position report', cprListener); } - if(!options.disableMciCache) { + if(!options.disableMciCache && !mciMapFromCache) { // cache our MCI findings... client.mciCache[artHash] = mciMap; - client.log.trace( { artHash : artHash, mciMap : mciMap }, 'Added MCI map from cache'); + client.log.trace( { artHash : artHash, mciMap : mciMap }, 'Added MCI map to cache'); } ansiParser.removeAllListeners(); // :TODO: Necessary??? @@ -288,6 +289,7 @@ function display(client, art, options, cb) { } if(mciMap) { + mciMapFromCache = true; client.log.trace( { artHash : artHash, mciMap : mciMap }, 'Loaded MCI map from cache'); } else { // no cached MCI info diff --git a/mods/prompt.hjson b/mods/prompt.hjson index cdfdf562..3dac7326 100644 --- a/mods/prompt.hjson +++ b/mods/prompt.hjson @@ -59,16 +59,19 @@ } } - "menuCommand" : { + menuCommand: { art: MNUPRMT - "mci" : { - "ET2" : { - "argName" : "command", - "width" : 20, - "maxLength" : 20, - "submit" : true, - "textStyle" : "U", - "focus" : true + mci: { + TL1: { + // theme me! + } + ET2: { + argName: command + width: 20 + maxLength: 20 + submit: true + textStyle: upper + focus: true } } }, diff --git a/package.json b/package.json index ccd25479..5664f664 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "temp": "^0.8.3", "inquirer" : "^1.1.0", "fs-extra" : "0.26.x", - "farmhash" : "^1.2.0" + "farmhash" : "^1.2.1" }, "engines": { "node": ">=4.2.0"