Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@chaucerbao
Copy link
Contributor

@chaucerbao chaucerbao commented Feb 6, 2019

In certain cases, when I use :ALEGoToDefinition (or other jumping call) and it leads to a location in the same file, the cursor moves, but the screen does not redraw. Then, when I use a motion movement or wait a few seconds, the screen will finally update. This may be due to Vim's lazyredraw setting.

This PR forces a redraw after the cursor moves.

@chaucerbao
Copy link
Contributor Author

Also, let me know what you think about centering the line within the viewport with:

normal zz

after the call cursor().

@chaucerbao
Copy link
Contributor Author

I just added it in anyway. If you don't like that behavior, I can easily remove it.

@chaucerbao
Copy link
Contributor Author

Okay, well since the zz is a movement which also causes a redraw, I removed the redraw!

@chaucerbao chaucerbao changed the title Force Vim to redraw after ale#util#Open Center the line in the viewport after ale#util#Open jumps Feb 6, 2019
@chaucerbao chaucerbao changed the title Center the line in the viewport after ale#util#Open jumps Center the result after ale#util#Open jumps Feb 10, 2019
Copy link
Member

@w0rp w0rp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about this a bit. I say let's go with it. If someone doesn't like it, we can add a setting to disable it.

@w0rp w0rp merged commit 752e6f0 into dense-analysis:master Feb 10, 2019
@w0rp
Copy link
Member

w0rp commented Feb 10, 2019

Cheers! 🍻

@chaucerbao chaucerbao deleted the feature/redraw-after-open branch February 11, 2019 19:00
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

Successfully merging this pull request may close these issues.

2 participants