chris-morgan / tty-player

<tty-player>: <video>, but for ttyrec scripts
MIT License
90 stars 7 forks source link

stalls on vim start #1

Closed codebutcher closed 9 years ago

codebutcher commented 9 years ago

The player stalls with the vim status-bar and a blank screen every time vim is run The player then ceases to function due to a JS error

screen shot 2015-08-13 at 08 19 43

This issue was produced on chrome

The scenario generates the following JS error (in term.js):

screen shot 2015-08-13 at 08 48 28

short analysis : term is receiving 23 lines of input in vi mode when screen height is 24 lines

chris-morgan commented 9 years ago

This looks like a term.js bug, but I’ll need a little more to diagnose is precisely.

Could you please post the following:

codebutcher commented 9 years ago
  1. attaching a sample
  2. using the term.js from the ttyplayer repo.

On Thu, Aug 13, 2015 at 9:14 AM, Chris Morgan notifications@github.com wrote:

This looks like a term.js bug, but I’ll need a little more to diagnose is precisely.

Could you please post the following:

  • a sample ttyrec file that demonstrates this;
  • the specific version of term.js being used?

— Reply to this email directly or view it on GitHub https://github.com/chris-morgan/tty-player/issues/1#issuecomment-130549963 .

chris-morgan commented 9 years ago

(Attaching a .ttyrec file having failed, I was emailed the sample file.)

If you resize the tty-player to 180 columns wide, it works. It’s failing when it sends ESC[23;1H~«178 spaces», so it’s a simple overflow that term.js isn’t coping with—79 spaces on line 23, 80 on line 24, then it’s off the screen for the final 19 spaces.

If you use termrec for recording, it includes the width and height in the ttyrec script (you need to use a version of term.js including chjj/term.js#75 for it to work), so you wouldn’t run into this issue. You can also go specifying the cols and rows attributes on the tty-player element.

As for the exception itself, I was able to reduce it very effectively and have filed chjj/term.js#84 for the matter. As it is a term.js issue and not a tty-player issue (with the way of achieving the desired behaviour explained in the previous paragraph also), I am closing this issue.