On 12/11/13 23:50, Patrick Brisbin wrote:
Hello,
When I launch vim, I see "[[^2;2R" in the message area. Any form of
redraw clears it and beginning to type an exe command will type over it.
From some googling, it may have something to do with vim requesting the
terminal's cursor position and the terminal printing an unexpected
escape code.
The bug only occurs under the following conditions:
* Terminal is urxvt (does not occur in xterm or screen)
* First time executing vim in the specific terminal instance
* Vim is *not* opened with the `-u` option
I can't explain the last point, but it's important for reproducing the
bug. I have to place the example at ~/.vimrc and open vim normally.
Here is the minimal ~/.vimrc which reproduces for me:
function RegenerateCtags()
" the shell command invoked doesn't matter
silent! execute '!true'
endfunction
autocmd BufEnter * call RegenerateCtags()
Please find the attached bugreport.txt for version info. I can of course
provide any other details if needed.
Thanks!
Pat
Hm.
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Sep 3 2013 19:58:40)
Included patches: 1-16
Compiled by Arch Linux
Huge version with GTK2 GUI. Features included (+) or not (-):
Archlinux seems a bit slow to react to fixes. It's only partly their
fault: there are several new bugfixes practically every week. For
comparison, here are the corresponding lines to the above from the
version I use, and I checked a few minutes ago that it is still the very
latest:
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 12 2013 19:15:18)
Included patches: 1-91
Compiled by antoine.mechely...@gmail.com
Huge version with GTK2-GNOME GUI. Features included (+) or not (-):
On September 3, Vim 7.4.16 was indeed the latest version, but it didn't
remain so very long: 7.4.17 arrived on September 5. You can see a
summary of Vim 7.4's changelog at
http://ftp.vim.org/pub/vim/patches/7.4/README (or alternatively by FTP
which is sometimes more convenient if you decide to open that file in Vim).
Compiling your own Vim is not really hard, and it would allow you to
stay afloat with the latest bugfixes; for details, see
http://vim.wikia.com/wiki/Getting_the_Vim_source_with_Mercurial
http://users.skynet.be/antoine.mechelynck/vim/compunix.htm
At startup, Vim determines the terminal's characteristics (not the
cursor position etc. since it clears the screen) by sending the sequence
shown in the output of ":set termcap" as t_RV (see ":help xterm-codes")
if it is defined in that terminal's termcap, which usually means "only
for xterm", and — this may explain why it doesn't happen with -u — only
when started in 'nocompatible' mode, which means that either it was
invoked with the -N command-line switch, or the -u command-line option
was *not* present *and* Vim found a "user vimrc" or a "user gvimrc" — on
Linux the normal place for a user vimrc would be ~/.vimrc but, if that
isn't found, ~/_vimrc and (usually) ~/.vim/vimrc are also checked;
similarly for gvimrc. If the file is named .exrc or _exrc OTOH, Vim
remains in 'compatible' mode and doesn't ask anything to the terminal.
My konsole terminal, which pretends that it is an xterm, has t_RV set to
^[[>c (where ^[ means <Esc>) and a "real" xterm has the same. So Vim
sends that at startup and expects the terminal to eventually send
(asynchronously) a reply starting with either CSI (i.e. Alt-Esc) or Esc
followed by [ and ending in a lowercase c with only digits, dots and
semicolons in between (see ":help termresponse-variable"). If the
response never comes back, I don't think it's an error, but if the
terminal sends back ^[[2;2R as yours seems to do, *that's* a wrong
response and the best Vim can do, I think, is display it. (This is a
guess, however, and I'm not sure what Vim does before and after
executing a shell command. Swapping the terminal's display buffers, maybe.)
So, finally, a question to you: when you issue the command ":set
termcap" (without quotes of course) in Vim in that urxvt terminal of
yours, do you see a value (and which one) for t_RV ?
Best regards,
Tony.
--
This week only, all our fiber-fill jackets are marked down!
--
--
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.