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

A* is sometimes inserted into the top of my buffer after hitting the up arrow #579

Open
Kazark opened this issue Jun 20, 2014 · 15 comments
Open

Comments

@Kazark
Copy link

Kazark commented Jun 20, 2014

A* is sometimes inserted into the top of my buffer after hitting the up arrow to select a file while searching with Ctrl-P. Ctrl-P closes instead of selecting the file and inserts apparently random characters at the top of the buffer.

This does not seem to happen unless I have previously used backspace, e.g., CTRLPfoobarBKSPBKSPBKSPUP. Sometimes it takes multiple up-arrows before it happens; this seems to be roughly correlated to the size of the list of files that Ctrl-P has found.

This has only started happening recently, so it is possible that I have screwed something up. In addition to CtrlP, plugins are Pathogen, Kazarc, Tabv, SimpleSmoothScroll, FatFingerFixes, Conque, MatchIt, NERDtree, Syntastic, Vader, Abolish, Endwise, Fugitive, G, Razor, VimLint, and VimLParser. I am not actively using all these plugins so I will remove some of them and give it another try and report back. I'm running Vim 7.4 on Windows 7.

The only recent change to my configuration that I can think of that might have an impact (??) is that I have started source the Vim files for Go that come with its install. Other than that, the only other notable thing that my Vimrc is doing is firing up Pathogen.

@Kazark
Copy link
Author

Kazark commented Jun 20, 2014

I pulled the latest for most of the plugins and removed VimLParser. I'll report back about it.

@Kazark
Copy link
Author

Kazark commented Jun 23, 2014

Very strange. As odd as this behavior was in the first place, it has even more mysteriously disappeared. I'm unable to reproduce it now and I am going to close this issue until I can (which is hopefully never).

@Kazark Kazark closed this as completed Jun 23, 2014
@Kazark Kazark reopened this Jun 25, 2014
@Kazark
Copy link
Author

Kazark commented Jun 25, 2014

Okay, I have more details now. It seems that this only happens when you are typing in something that has a dash - in it. Also, it is not A* but *A, and I have seen a similar thing (presumably same root cause?) happen when I am typing something with a dash in it and then use the left and right arrow keys. Sometimes while pushing the left arrow the Ctrl-P window closes and suddenly *D is inserted into my buffer. Sometimes while pushing the right arrow the Ctrl-P window closes and suddenly *C is inserted into my buffer. This seems to happen around the time my cursor crosses the dash.

@Kazark
Copy link
Author

Kazark commented Jun 26, 2014

Okay, it isn't just with a dash -. This is very weird. I got a *D just now without having a dash in the word. Will continue to post things as I figure them out.

@liskin
Copy link

liskin commented Jul 1, 2014

Well, for me this started happenning when I upgraded vim from Debian's 2:7.4.273-2 to 2:7.4.335-1. Might be a vim issue, then. Have you perhaps got time to bisect this?

@Kazark
Copy link
Author

Kazark commented Jul 1, 2014

@liskin Hmm! That's good info. I tried to build Vim once before and did not succeed but I know a lot more now than I did then so I could try again. We'll see whether I have time... I'm about to exit a stage of life when I have a lot of free time, but bisecting that would be interesting...

@liskin
Copy link

liskin commented Jul 1, 2014

Well, if I had to do it (which I will if you don't manage to find free time sooner than I do), I'd just grab the Debian package source and tell it to build itself. :-)

@liskin
Copy link

liskin commented Jul 1, 2014

Oh, and F5 doesn't work either. I guess I'm going to bisect it right now, this is annoying as hell. :-(

@liskin
Copy link

liskin commented Jul 1, 2014

Okay, so it's this: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.305

@Kazark
Copy link
Author

Kazark commented Jul 1, 2014

@liskin You are awesome. What are you going to do about it?

@liskin
Copy link

liskin commented Jul 1, 2014

Although I'm getting more and more convinced that this is actually a ctrlp problem. When I revert that patch, arrows and mouse work okay, but if i add "set t_RV=" to my .vimrc, it stops working. I'm not sure termresponse should be mandatory to ctrlp.

Anyway, the workaround seems to be to remove set ttymouse from the vimrc, forcing vim to detect it itself and in doing so, request termresponse that is somehow needed for crtlp to work properly. I guess I can add a VimEnter autocmd to reset ttymouse to urxvt later.

Well, maybe it's a vim problem after all. Setting ttymouse manually is hardly a reason to avoid termresponse altogether, as it seems to query all sorts of things other than that.

@liskin
Copy link

liskin commented Jul 1, 2014

So, well, I don't know what I'm going to do about it. Sending an e-mail to the vim list might be a good idea, I guess.

@liskin
Copy link

liskin commented Jul 1, 2014

VimEnter doesn't work, but this seems to do the trick:

autocmd TermResponse * set ttymouse=urxvt

@liskin
Copy link

liskin commented Jul 10, 2014

This may fix this: ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.359
(haven't tested it yet, though)

@edanc
Copy link

edanc commented Aug 14, 2014

i am also having this issue. i just started using ctrlp . It happens all the time. once i open up ctrlp and use the arrow key to navigate the letters are inserted into the current file i have open

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

No branches or pull requests

3 participants