Skip to content

Commit

Permalink
New: term.tabSet() .tabClear() .tabClearAll() .forwardTab() and .back…
Browse files Browse the repository at this point in the history
…wardTab()
  • Loading branch information
cronvel committed Aug 28, 2017
1 parent c4fe4ba commit 3114206
Show file tree
Hide file tree
Showing 4 changed files with 18 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.13.9
-------

New: term.tabSet() .tabClear() .tabClearAll() .forwardTab() and .backwardTab()


v1.13.8
-------

Expand Down
5 changes: 5 additions & 0 deletions doc/low-level.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,11 @@ See [the full style markup reference](https://github.com/cronvel/string-kit#ref.
* .moveTo(x,y): move the cursor to the (x,y) coordinate (1,1 is the upper-left corner)
* .move(x,y): relative move of the cursor
* .hideCursor(): hide/show the cursor
* .tabSet(): set a new tab stop at the current cursor position
* .tabClear(): clear the tab stop at the current cursor position
* .tabClearAll(): clear all tab stops
* .forwardTab(n): move the cursor to the next tabulation 'n' times
* .backwardTab(n): move the cursor to the previous tabulation 'n' times



Expand Down
6 changes: 6 additions & 0 deletions lib/termconfig/xterm.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ var esc = {
//moveToBottomLeft: { on: '\x1bF' } , // Not widely supported
hideCursor: { on: '\x1b[?25l' , off: '\x1b[?25h' } ,

tabSet: { on: '\x1bH' } , // HTS
tabClear: { on: '\x1b[0g' } , // TBC
tabClearAll: { on: '\x1b[3g' } , // TBC
forwardTab: { on: '\x1b[%UI' } , // CHT
backwardTab: { on: '\x1b[%UZ' } , // CBT

// Cursor styles
blockCursor: { on: '\x1b[2 q' } ,
blinkingBlockCursor: { on: '\x1b[0 q' } ,
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.13.8",
"version": "1.13.9",
"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 3114206

Please sign in to comment.