Package: ttyrec
Version: 1.0.8-3
Severity: normal

Run ttyrec. Inside that, run screen. Inside screen, run vim, and open ttyrec.c.
Search for efopen.

If you play back the ttyrecord from that (I've attached one),
you will see a mess:

 if (optind < argc) {
 input = efopen(argv[optind], "r");
    } else {
 input = input_from_stdin();
    }

Apparently what displays as tabs when recording this is stored and
redisplayed as a single space. Note that this happens even if ttyplay is
run in screen -- which should cause it to play back identically.

Looking at the ttyrecord contents, I see this:

    } ^[[33melse^[[39m {^[[5D
 input = input_from_stdin();^M

The escape seqences are all for colorization; there is nothing to
move the second line over a tab. How does it display as one in screen
when being recorded, then? I don't know.

If instead you run screen, run ttyrec inside screen, and do the same thing
with vim, that plays back with tabs appearing correctly. Looking at the
ttyrecord recorded this way, I can see vim is emulating tabs by using
absolute cursor positioning (to 8, 13):

    } ^[[33melse^[[m {^[[13;8H input = input_from_stdin();^M

I also tried not using screen, but setting TERM=screen and using vim 
as before. When this is done, ttyrec again managed to record the vim's
use of cursor positioning, and it plays back ok.

I have to conclude that, somehow, screen is moving the cursor in a way
that is not recorded by ttyrec. The only way I can imagine it could do
this is if it's somehow finding and opening the master tty, and sending
cursor movement commands directly to it. Bypassing ttyrec's recorded slave
tty.

Workaround: Use tmux instead of screen when using ttyrec. Meh.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.31-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages ttyrec depends on:
ii  libc6                         2.10.2-2   GNU C Library: Shared libraries

ttyrec recommends no packages.

ttyrec suggests no packages.

-- debconf-show failed

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature

Reply via email to