File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -36,9 +36,6 @@ function term (opts) {
36
36
// cached "context"
37
37
canvas . renderCtx = canvas . getContext ( '2d' ) ;
38
38
39
- // create `ansi()` cursor
40
- canvas . cursor = ansi ( stream ) ;
41
-
42
39
return canvas ;
43
40
}
44
41
@@ -49,20 +46,21 @@ function term (opts) {
49
46
*/
50
47
51
48
function render ( ) {
49
+ var cursor = ansi ( this . stream ) ;
50
+ cursor . write ( '\n' ) ;
52
51
53
52
// erase everything on the screen
54
- this . cursor . eraseData ( 2 ) ;
53
+ cursor . eraseData ( 2 ) ;
55
54
56
55
// go to the top left origin (1-indexed, not 0...)
57
- this . cursor . goto ( 1 , 1 ) ;
56
+ cursor . goto ( 1 , 1 ) ;
58
57
59
58
// render the current <canvas> contents to the TTY
60
59
var ctx = this . renderCtx ;
61
60
var w = this . width ;
62
61
var h = this . height ;
63
62
var alphaThreshold = 0 ;
64
63
var pixel = this . pixel ;
65
- var cursor = this . cursor ;
66
64
67
65
var data = ctx . getImageData ( 0 , 0 , w , h ) . data ;
68
66
You can’t perform that action at this time.
0 commit comments