Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
GoogleCodeExporter opened this issue Aug 18, 2015 · 6 comments
Closed

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Still seeing similar issue as of 7.4.622, except in my case it appears at the 
top of the buffer area instead of the messages area. I filed #390 with details.

Original comment by dbarn...@google.com on 2 Aug 2015 at 9:29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant