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

Cursor jumps upward if escaping insert mode before buffer is populated. #78

Closed
dwayneyuen opened this issue Feb 13, 2017 · 7 comments
Closed

Comments

@dwayneyuen
Copy link

dwayneyuen commented Feb 13, 2017

The general issue appears to be if I type something and hit escape prior to the autocompletion buffer appearing, that my cursor jumps upwards. I have set g:completor_auto_trigger to 1.

I can replicate this specifically with the below example in python.

If I have a module imported, and I type the module name, it tries to populate an autocompletion buffer with recommendations. Then when I type a period, it tries to populate an autocompletion buffer with recommendations from the module. But if I type the period before the first buffer appears, and then escape before the second buffer appears, then my cursor jumps up a seemingly arbitrary amount. I've been able to narrow this down to this plugin (all other plugins are disabled). This example triggers it for me:

import math

mat  # Finish typing 'math.' then hit esc

If you complete typing the word math. and escape before the autocompletion buffer pops up, your cursor should go up one line.

In some of my files my cursor will jump up ~20 lines with 100% reproducibility.

@cornop
Copy link

cornop commented Apr 10, 2017

I can also reproduce this in python files, it's quite annoying when completion is slow.

@maralla
Copy link
Owner

maralla commented Apr 11, 2017

I committed a fix #97 for this problem. Please update and try again.

@cornop
Copy link

cornop commented Apr 11, 2017

The problem is fixed for some cases, but it still persists, for example:

import numpy
numpy.
# make sure you have a line below

Adding anything on the numpy. line causes the cursor to move down. I picked numpy because its completion is slower than math and makes it easier to reproduce.

@dwayneyuen
Copy link
Author

dwayneyuen commented Apr 11, 2017

I experience the same behavior as @cornop (cursor moving downward).

@maralla
Copy link
Owner

maralla commented Apr 12, 2017

I pushed one more commit. Please update and try again.

@cornop
Copy link

cornop commented Apr 13, 2017

The last commit fixed it for me. Thanks a lot!

@dwayneyuen
Copy link
Author

dwayneyuen commented Apr 13, 2017

edit: corrected

This fixes it for me as well. Thank you! I love this plugin and recommend it to anyone when I can! :)

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