willys5000 / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

"[[2;2R" printed in messages area on BufEnter shell command #183

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Add the following to example.vimrc

  function RegenerateCtags()
    " the shell command invoked doesn't matter
    silent! execute '!true'
  endfunction
  autocmd BufEnter * call RegenerateCtags()

2. Open a fresh urxvt terminal
3. vim -u example.vimrc

* What is the expected output?

Vim starts normally, with nothing showing in the messages area.

* What do you see instead?

Vim displays (what looks like) a terminal escape, "[[2;2R", in the messages 
area.

* What version of the product are you using?

  VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 10 2013 20:26:12)
  Included patches: 1-86

* On what operating system?

Arch Linux.

* Other information

Nazri Ramliy reproduced in XTerm(278) with vim 7.4.91 and also found the 
offending patch via hg bisect:

  $ hg log -v -r 5090
  changeset:   5090:8b7baf39a345
  tag:         v7-3-1288
  user:        Bram Moolenaar <bram@vim.org>
  date:        Wed Jul 03 12:45:31 2013 +0200
  files:       src/proto/screen.pro src/screen.c src/term.c src/version.c
  description:
  updated for version 7.3.1288
  Problem:    The first ":echo 'hello'" command output doesn't show.  Mapping
              for <S-F3> gets triggered during startup.
  Solution:   Add debugging code for the termresponse.  When receiving the "Co"
              entry and when setting 'ambiwidth' redraw right away if possible.
              Add redraw_asap().  Don't set 'ambiwidth' if it already had the
              right value.  Do the 'ambiwidth' check in the second row to avoid
              confusion with <S-F3>.

Thanks,
Pat

---

PS:

I apologize if cross-posting from the mailing list is bad form. The message 
seemed to get lost in the backlog and rather than "bump" it, I thought this 
would be a better way to ensure it gets tracked.

Original issue reported on code.google.com by pbris...@gmail.com on 26 Nov 2013 at 2:34

Attachments:

GoogleCodeExporter commented 9 years ago
You should put "set nocp" in the script, otherwise the terminal version isn't 
requested.

Despite that, I can't reproduce the problem on Ubuntu.  Tried xterm and urxvt.
This might be a race condition.

Original comment by brammool...@gmail.com on 28 Nov 2013 at 5:38

GoogleCodeExporter commented 9 years ago
My bad on nocp, figured that out further down the ML thread but copied the 
wrong example into this issue.

FWIW, this reproduces most reliably if it's the first thing I do in a fresh 
terminal.

Original comment by pbris...@gmail.com on 28 Nov 2013 at 5:59

GoogleCodeExporter commented 9 years ago
I have a similar issue (I think) in my setup. I use iterm2 on Mac to ssh onto 
my ubuntu desktop, where I then use tmux with iterm2-tmux integration.

Here if I try to open vim with any file, a sequence that ends in ";2R" is 
received by VIM as input and I end up in replace mode. The repro steps above 
produces this consistently for me. I have a slightly simpler case that this 
also happens for.

1. Add the following to example.vimrc

    set nocp
    au BufEnter * set ignorecase
2. Run vim -u example.vimrc

Interestingly, for me, this happens only when vim is opened, not when I open 
new buffers.

Do you think this a bug with VIM or a bug with the terminal emulator?

Original comment by yunchi...@google.com on 18 Mar 2014 at 2:39

GoogleCodeExporter commented 9 years ago
Patch 7.4.207 may fix this.  Not sure, since I cannot reproduce the original 
problem.

Original comment by br...@google.com on 19 Mar 2014 at 1:06

GoogleCodeExporter commented 9 years ago
I think this is fixed. If not please open a new issue.

Original comment by chrisbr...@googlemail.com on 3 Oct 2014 at 11:42