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

refresh: always breaking '.' register #185

Closed
Valloric opened this issue Apr 30, 2012 · 15 comments
Closed

refresh: always breaking '.' register #185

Valloric opened this issue Apr 30, 2012 · 15 comments

Comments

@Valloric
Copy link

I see the comment on line 626 about setting refresh: 'always' and then breaking the dot register. I saw that there was an attempt at fixing this, but the problem still remains even with Vim 7.3.475.

Any clue on when this will be fixed? Is there some sort of workaround?

@Shougo
Copy link
Owner

Shougo commented May 2, 2012

Any clue on when this will be fixed? Is there some sort of workaround?

Yes. In my environment, it still not fixed. Can you check your environment?

@Valloric
Copy link
Author

Valloric commented May 2, 2012

For me it's not fixed as well. I'm using Vim 7.3.496.

On Tue, May 1, 2012 at 5:01 PM, Shougo <
reply@reply.github.com

wrote:

Any clue on when this will be fixed? Is there some sort of workaround?

Yes. In my environment, it still not fixed. Can you check your environment?


Reply to this email directly or view it on GitHub:
#185 (comment)

@Shougo
Copy link
Owner

Shougo commented May 2, 2012

Oh...
I think the bug must be fixed. But I have not much time and technique...

@mattn
Copy link

mattn commented May 5, 2012

@Valloric please let us known the way to reproduce.

@Valloric
Copy link
Author

Valloric commented May 5, 2012

I've noticed this problem while developing a separate Vim plugin, but it should be reproducible with neo as well. One needs to have Vim >= 7.3.418 and g:neocomplcache_enable_cursor_hold_i = 1. Actually, it might be easier to reproduce if you just comment out the conditions and always return dict.refresh = 'always' (just for testing).

Bottom line, if the completefunc returns a dict with refresh = 'always', then neo will be called on every keystroke. If you then just type through the completions without accepting anything, the '.' register holds bad history. For me, when I type a word that's present in neo's database but ignore the offered completion, the insert history in the '.' register is broken and does not have the whole word stored.

@Valloric
Copy link
Author

Valloric commented May 5, 2012

Here's an example:

  1. if "neocomplcache" is stored in neo's database
  2. I have g:neocomplcache_enable_cursor_hold_i = 1 and a recent Vim
  3. I enter insert mode and type "neocomplcache testing" (NOT accepting the completion offered, just typing)
  4. I leave insert mode.
  5. press '.' to insert all that text again
  6. I get nonsense text instead of "neocomplache testing".

This is not a bug in neo but a bug in Vim; I get the same problem with a different custom completefunc.

@Shougo
Copy link
Owner

Shougo commented May 6, 2012

Thanks for your bug report!

@Valloric
Copy link
Author

Valloric commented May 6, 2012

I'll be thanking you if you provide a fix for this in Vim :). I'm new to the Vim codebase and tracking down the root cause of this seems non-trivial. I saw that @mattn tried to fix this once (Vim patch 7.3.404) so maybe with this new data, it will be easier to track down and fix for good.

@mattn
Copy link

mattn commented May 7, 2012

Sorry for delay. I'll look into it later.

@mattn
Copy link

mattn commented May 7, 2012

I tested following.

  1. added let g:neocomplcache_enable_at_startup = 1 and let g:neocomplcache_enable_cursor_hold_i = 1 into my vimrc
  2. started vim and typed neocomplcache testing on insert mode.
  3. typed <esc>:reg<cr>

I can see ". neocomplcache testing.

@Valloric
Copy link
Author

Valloric commented May 7, 2012

Like I said, what you type in needs to be already in neo's database. You need to be offered a completion suggestion; the suggestion window needs to appear.

Here's a screencast of the problem: http://dl.dropbox.com/u/2076969/vim_broken_dot_register.mov

@Valloric
Copy link
Author

@mattn Do you know when the patch you posted on the vim-dev thread is going to be officially upstreamed to Vim? I've been using Vim with your patch since you posted it and have had zero issues since. It fully fixes the problem I had.

@mattn
Copy link

mattn commented May 16, 2012

Bram knows the answer. Probably it's in his todo list. He often pick up from the todo list in his priority. If you warry about, try to post 'ping'. Then, the post may change the priority. :)

@Valloric
Copy link
Author

I've just pinged the thread on vim-dev. Thanks for writing the patch
and fixing the problem!

On Tue, May 15, 2012 at 6:19 PM, mattn
reply@reply.github.com
wrote:

Bram knows the answer. Probably it's in his todo list. He often pick up from the todo list in his priority. If you warry about, try to post 'ping'. Then, the post may change the priority. :)


Reply to this email directly or view it on GitHub:
#185 (comment)

@Shougo
Copy link
Owner

Shougo commented Jun 20, 2012

This problem was fixed in 7.3.561.
Thanks @mattn!

@Shougo Shougo closed this as completed Jun 20, 2012
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