Hayaki Saito wrote:

> Hi, lists
> 
> These days ago, Yukihiro Nakadaira found "garbage output" problem in
> gnome-terminal.  Here are some reproducing examples:
> 
> $ cd /path/to/vim/src/testdir
> $ ../vim -u unix.vim -U NONE --noplugin -s dotest.in test85.in
> $ 1;3400;0c   <- response for T_CRV
> 
> $ vim -u NONE -N -c quit
> $ R   <- response for T_U7
> 
> $ cat quit.in
> :quit
> $ vim -u NONE -N -s quit.in
> $ R1;3400;0c   <- response for T_U7 and T_CRV
> 
> This problem is caused by T_CRV / T_U7 response sent by some VT200
> compatible terminals.
> It depends on the timing factor, so it has no reliable
> reproducibility, and it often occurs during SSH session.
> 
> The workaround for the similar problem with T_CRV when vim is launched
> with -c option already exists. (See the comment around main.c:932.)
> Notwithstanding, this example will reproduce the same problem with -c option.
> 
> $ vim -u NONE -N -c 'call feedkeys(":quit\<CR>")'
> $ R1;3400;0c   <- response for T_U7 and T_CRV
> 
> The attached patch will fix above problems.
> This code waits some seconds when vim goes to shut down if T_CRV/T_U7
> status is sent already.

Thanks.  Waiting for 100 msec is a bit long, does it also work when
waiting for 20 msec?  I guess any time will do so long as we give the
terminal a chance to get some CPU time.

stoptermcap() is also used for shell commands.  If someone has a shell
command in his startup script then tcflush() might cause a problem.
It might help to call it only when exiting.

-- 
GUARD #1:  What -- a swallow carrying a coconut?
ARTHUR:    It could grip it by the husk!
GUARD #1:  It's not a question of where he grips it!  It's a simple question
           of weight ratios!  A five ounce bird could not carry a 1 pound
           coconut.
                                  The Quest for the Holy Grail (Monty Python)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui