Skip to content

Commit

Permalink
Report bad escape sequence entry and continue anyway
Browse files Browse the repository at this point in the history
  • Loading branch information
Cédric Ronvel committed Nov 30, 2018
1 parent 4cd3dca commit 41e2e39
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@

v1.26.6
-------

Report bad escape sequence entry and continue anyway


v1.26.5
-------

Expand Down
5 changes: 5 additions & 0 deletions lib/Terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,11 @@ Terminal.create = function createTerminal( createOptions ) {

Object.keys( term.esc ).forEach( ( key ) => {

if ( ! term.esc[ key ] || typeof term.esc[ key ] !== 'object' ) {
console.error( "Bad escape sequence entry '" + key + "' using termconfig: '" + term.termconfigFile + "'." ) ;
return ;
}

// build-time resolution
if ( typeof term.esc[ key ].on === 'function' ) { term.esc[ key ].on = term.esc[ key ].on.call( term ) ; }
if ( typeof term.esc[ key ].off === 'function' ) { term.esc[ key ].off = term.esc[ key ].off.call( term ) ; }
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "terminal-kit",
"version": "1.26.5",
"version": "1.26.6",
"description": "256 colors, keys and mouse, input field, progress bars, screen buffer (including 32-bit composition and image loading), text buffer, and many more... Whether you just need colors and styles, build a simple interactive command line tool or a complexe terminal app: this is the absolute terminal lib for Node.js!",
"main": "lib/termkit.js",
"directories": {
Expand Down

0 comments on commit 41e2e39

Please sign in to comment.