noib3 / nvim-completion

:zap: An async autocompletion framework for Neovim
MIT License
503 stars 13 forks source link

accurately calculate available screen space #12

Closed MurdeRM3L0DY closed 2 years ago

MurdeRM3L0DY commented 2 years ago

This changes the calculation of available screen space for the positioning of the windows and which also should fix this. It takes into consideration users' cmdheight, laststatus and tabline settings during the calculation.

MurdeRM3L0DY commented 2 years ago

I applied the changes you suggested. I also changed some integers to be u16 instead of u32. Let me know if you think these changes looks good to you.

noib3 commented 2 years ago

All changedticks should remain u32, the rest looks good.

MurdeRM3L0DY commented 2 years ago

I've introduced another overflow bug.

https://user-images.githubusercontent.com/95099980/164004118-9641c3c7-74ec-4f80-aa9f-ba77b4fd642d.mp4

In a telescope prompt screenrow seems to always return 1

noib3 commented 2 years ago

I've introduced another overflow bug.

2022-04-19.14-31-20.mp4 In a telescope prompt screenrow seems to always return 1

Does screenpos work?

MurdeRM3L0DY commented 2 years ago

yeah, screenpos worked the last time I checked

noib3 commented 2 years ago

Ok, let's use that instead of screenrow and screencol.

MurdeRM3L0DY commented 2 years ago

Should be all good now.