(05/18/2011 03:55 PM), Robin Lee Powell wrote:
> On Wed, May 18, 2011 at 03:27:20PM -0700, Micah Cowan wrote:
>>
>> A workaround should be to alias vim to 'clear; vim' or something.
> 
> Ah.  Yes, that works; with older tmux I had tested clear and it
> broke in the same way vim does, but with HEAD this works fine.
> 
>> What I don't understand is: what made vim change what it's sending
>> in terminal codes? TERM was set to screen in both cases, right?
>> ...or do you have TERM set inappropriately within tmux? And why
>> isn't it doing the exact same thing when you're running it under
>> screen? It looks like vim _is_ still sending the clear-screen
>> codes in screen_new_1.txt (which is why it's still working)...
>> what's different?
> 
> *Interesting*.
> 
> Under screen, the terminal is "screen-bce".  Under tmux, it's
> "screen".
> 
> If I set the terminal to "screen-bce" under tmux HEAD, the problem
> goes away.  It doesn't appear help on 1.3 on the same machine, or
> 1.4 on the other machine, only HEAD.

Not a great idea to leave it that way as a solution, though; tmux
doesn't do bce, I believe. This makes a difference to some apps, like
(probably?) dialog or maybe mc, or even vim probably if you use
background colors. But it definitely helps explain why you found it
necessary to turn bce on in your screen config. :)

> My suspicion, therefore, is that the screen terminal on your machine
> is like the screen-bce terminal on mine, somehow.  I don't really
> know much about terminal definitions; if you tell me how to dump it,
> I will.

Assuming you have the appropriate tools installed (usual case), you can do

  infocmp screen
and
  infocmp screen-bce

to compare them. If you direct those to files, you can compare with
wdiff (best) or diff (fallback). Literally the only change, aside from
names and comments, should be that screen-bce advertises a "bte"
capability that screen doesn't.

Most likely, the broken capability is named "clear". My screen has:

...
        clear=\E[H\E[J, cnorm=\E[34h\E[?25h, cr=^M,
...

which is correct. If your screen has something else, or lacks a "clear"
altogether, that'd be your problem.

You can edit the files you created by directing infocmp, and then feed
them back into terminfo's system by specifying them as the argument of
the tic command, if you have that installed. If you run it as root, it
installs it system-wide, otherwise it installs it at a special place
under your home directory, and it will of course only impact that
specific user.

I believe the GNU screen sources include appropriate terminfo
definitions, so if you download that you can feed them to tic to be sure
you're using the latest officially recommended ones.

> I really *really* appreciate all your help.

You're welcome. :)

-- 
Micah J. Cowan
http://micah.cowan.name/

------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to