Skip to content

Conversation

@scratchyone
Copy link

This PR fixes #1397, and adds support for the NVIM v0.10.0 nvim_win_get_config() API change.

It prioritizes the new API by making it the default and turning the return values into the v0.10.0 format if the user is running an older version of NVIM.

I've tested this locally and it fixes all the issues with code actions for me on NVIM v0.10.0-dev-2393+g93c911e52-Homebrew .

@glepnir
Copy link
Member

glepnir commented Feb 25, 2024

there has util is_ten as condtion i do some check in layout you can check it.

@scratchyone
Copy link
Author

scratchyone commented Feb 26, 2024

there has util is_ten as condtion i do some check in layout you can check it.

I noticed that helper function while I was reviewing the rest of the codebase for any other possible v0.10.0-related bugs. However, I was worried about future-proofness because it appears to only check the minor version. That approach might not work properly if/when NVIM goes to version 1.0, which is why I decided to check the data-type instead. However, if you'd rather me update the commit to use the is_ten function I'd be happy to do that.

@glepnir
Copy link
Member

glepnir commented Feb 26, 2024

in nightly the return type lua convert is fixed so when 0.10 released i decide remove support for 0.9* so we can just use nvim_win_get_config().col/row directly.

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.

nvim_win_get_config() returns numbers for col and row and not table

2 participants