terminal-kit
Advanced tools
Comparing version 2.10.1 to 2.10.2
@@ -521,2 +521,14 @@ /* | ||
userActions.scrollTop = function() { | ||
this.textBuffer.moveTo( 0 , 0 ) ; | ||
this.scrollTo( 0 , 0 ) ; | ||
this.emit( 'cursorMove' ) ; | ||
} ; | ||
userActions.scrollBottom = function() { | ||
this.textBuffer.moveTo( 0 , this.textBuffer.buffer.length - 1 ) ; | ||
this.autoScrollAndDrawCursor() ; | ||
this.emit( 'cursorMove' ) ; | ||
} ; | ||
userActions.scrollDown = function() { | ||
@@ -523,0 +535,0 @@ var dy = -Math.ceil( this.outputHeight / 2 ) ; |
@@ -369,4 +369,2 @@ /* | ||
TextBox.prototype.autoScrollAndDrawCursor = function() { return this.autoScrollAndDraw( true ) ; } ; | ||
@@ -610,3 +608,3 @@ | ||
this.scroll( 0 , Math.ceil( this.textAreaHeight / 5 ) ) ; | ||
this.emit( 'cursorChange' ) ; | ||
this.emit( 'scroll' ) ; | ||
} ; | ||
@@ -616,3 +614,3 @@ | ||
this.scroll( 0 , -Math.ceil( this.textAreaHeight / 5 ) ) ; | ||
this.emit( 'cursorChange' ) ; | ||
this.emit( 'scroll' ) ; | ||
} ; | ||
@@ -622,3 +620,3 @@ | ||
this.scroll( 0 , Math.ceil( this.textAreaHeight / 2 ) ) ; | ||
this.emit( 'cursorChange' ) ; | ||
this.emit( 'scroll' ) ; | ||
} ; | ||
@@ -628,3 +626,3 @@ | ||
this.scroll( 0 , -Math.ceil( this.textAreaHeight / 2 ) ) ; | ||
this.emit( 'cursorChange' ) ; | ||
this.emit( 'scroll' ) ; | ||
} ; | ||
@@ -634,3 +632,3 @@ | ||
this.scroll( Math.ceil( this.textAreaWidth / 2 ) , 0 ) ; | ||
this.emit( 'cursorChange' ) ; | ||
this.emit( 'scroll' ) ; | ||
} ; | ||
@@ -640,3 +638,3 @@ | ||
this.scroll( -Math.ceil( this.textAreaWidth / 2 ) , 0 ) ; | ||
this.emit( 'cursorChange' ) ; | ||
this.emit( 'scroll' ) ; | ||
} ; | ||
@@ -646,3 +644,3 @@ | ||
this.scrollToTop() ; | ||
this.emit( 'cursorChange' ) ; | ||
this.emit( 'scroll' ) ; | ||
} ; | ||
@@ -652,3 +650,3 @@ | ||
this.scrollToBottom() ; | ||
this.emit( 'cursorChange' ) ; | ||
this.emit( 'scroll' ) ; | ||
} ; | ||
@@ -655,0 +653,0 @@ |
@@ -524,1 +524,45 @@ /* | ||
const asciiSymbolName = { | ||
' ': 'SPACE' , | ||
'!': 'EXCLAMATION' , | ||
'"': 'DOUBLE_QUOTE' , | ||
'#': 'HASH' , | ||
'$': 'DOLLAR' , | ||
'%': 'PERCENT' , | ||
'&': 'AMPERSAND' , | ||
"'": 'SINGLE_QUOTE' , | ||
'(': 'OPEN_PARENTHESIS' , | ||
')': 'CLOSE_PARENTHESIS' , | ||
'*': 'ASTERISK' , | ||
'+': 'PLUS' , | ||
',': 'COMMA' , | ||
'-': 'HYPHEN' , | ||
'.': 'DOT' , | ||
'/': 'SLASH' , | ||
':': 'COLON' , | ||
';': 'SEMICOLON' , | ||
'<': 'LESS_THAN' , | ||
'=': 'EQUAL' , | ||
'>': 'GREATER_THAN' , | ||
'?': 'QUESTION' , | ||
'@': 'AT' , | ||
'[': 'OPEN_BRACKET' , | ||
'\\': 'BACKSLASH' , | ||
']': 'CLOSE_BRACKET' , | ||
'^': 'CARET' , | ||
'_': 'UNDERSCORE' , | ||
'`': 'BACK_QUOTE' , | ||
'{': 'OPEN_BRACE' , | ||
'|': 'PIPE' , | ||
'}': 'CLOSE_BRACE' , | ||
'~': 'TILDE' | ||
} ; | ||
// Non-control character name | ||
exports.characterName = char => { | ||
if ( asciiSymbolName[ char ] ) { return asciiSymbolName[ char ] ; } | ||
return char.toUpperCase() ; | ||
} ; | ||
@@ -1299,3 +1299,3 @@ /* | ||
name = this.metaKeyPrefix + '_' + name.toUpperCase() ; | ||
name = this.metaKeyPrefix + '_' + termkit.characterName( name ) ; | ||
@@ -1302,0 +1302,0 @@ this.metaKeyPrefix = null ; |
@@ -819,2 +819,3 @@ /* | ||
// TODOC | ||
// Return true if found, else return false | ||
TextBuffer.prototype.updateCursorFromCell = function( cursorCell ) { | ||
@@ -829,6 +830,8 @@ for ( let y = 0 ; y < this.buffer.length ; y ++ ) { | ||
this.cy = y ; | ||
return ; | ||
return true ; | ||
} | ||
} | ||
} | ||
return false ; | ||
} ; | ||
@@ -835,0 +838,0 @@ |
{ | ||
"name": "terminal-kit", | ||
"version": "2.10.1", | ||
"version": "2.10.2", | ||
"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!", | ||
@@ -5,0 +5,0 @@ "main": "lib/termkit.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4809170
82633