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

nvim_win_get_position/ nvim_open_win maybe problematic #98

Closed
eyalk5 opened this issue Feb 20, 2020 · 9 comments
Closed

nvim_win_get_position/ nvim_open_win maybe problematic #98

eyalk5 opened this issue Feb 20, 2020 · 9 comments

Comments

@eyalk5
Copy link

eyalk5 commented Feb 20, 2020

see Yggdroot/LeaderF#501

@eyalk5
Copy link
Author

eyalk5 commented Feb 22, 2020

nvim_win_get_position returns ['0', '0'].
That is why the heigth is set to -1, resulting in
{'relative': 'editor', 'anchor': 'SW', 'height': -1, 'width': 70, 'row': -1, 'col': 0}
as a paramter to open_win.

@akiyosi
Copy link
Owner

akiyosi commented Feb 23, 2020

Hi
Thanks for this report.

I'm not sure, but is the problem that the echo nvim_win_get_position(win_getid('%')) result is always [0, 0] on the float window? Indeed, I have confirmed that the above result is [0, 0] on the float window displayed by Yggdroot/LeaderF. Also, neovim-qt may return a normal position such as [14, 26]. I think this problem may seems to be a problem on nvim core.
I will continue to investigate.

@akiyosi
Copy link
Owner

akiyosi commented Feb 23, 2020

I reported an issue: neovim/neovim#11935

@eyalk5
Copy link
Author

eyalk5 commented Feb 29, 2020

So, what is the verdict? should leaderF implementation change?

@akiyosi
Copy link
Owner

akiyosi commented Mar 1, 2020

Yes, according to neovim/neovim#11935, leaderF implementation will need to change.
According to neovim/neovim#11935, I think the following line needs to be changed to nvim_win_get_config():

https://github.com/Yggdroot/LeaderF/blob/d6a6b63eedf2b91c2f5c620b6ea1a5090fc7fee7/autoload/leaderf/python/leaderf/manager.py#L429-L430

akiyosi added a commit that referenced this issue Mar 6, 2020
@akiyosi
Copy link
Owner

akiyosi commented Mar 6, 2020

this issue fixed with Yggdroot/LeaderF@eb91151 and 8cad126

@akiyosi
Copy link
Owner

akiyosi commented Mar 15, 2020

This has been fixed in v0.4.5.
please confirm.

@eyalk5
Copy link
Author

eyalk5 commented Mar 15, 2020

This is working up to wrong position. But their bug anyway. Thanks.

@eyalk5 eyalk5 closed this as completed Mar 15, 2020
@akiyosi
Copy link
Owner

akiyosi commented Mar 20, 2020

Is it still displayed in the wrong position?

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

2 participants