Skip to content

feat: allow pos="center", row=0, line=0#227

Merged
l-kershaw merged 8 commits intonvim-lua:masterfrom
l-kershaw:feat/popup_center
Sep 19, 2021
Merged

feat: allow pos="center", row=0, line=0#227
l-kershaw merged 8 commits intonvim-lua:masterfrom
l-kershaw:feat/popup_center

Conversation

@l-kershaw
Copy link
Copy Markdown
Collaborator

Heavily based on the implementation from this PR by @jesseleite.

Also, added options to center in only one direction using 0 for row/line.
This required shifting the indices of everything else by one, which is a bit annoying, but this is how the implementation in vim works, so 🤷
This does break stuff in telescope, so I will write a PR over there when I get a chance.

@l-kershaw
Copy link
Copy Markdown
Collaborator Author

As mentioned here, the tests are currently broken as there is no longer a "nightly" tagged neovim release

Copy link
Copy Markdown
Collaborator

@Conni2461 Conni2461 left a comment

Choose a reason for hiding this comment

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

LGTM if you are done we can update the notice date and merge this + the telescope PR

@Conni2461
Copy link
Copy Markdown
Collaborator

@l-kershaw
Copy link
Copy Markdown
Collaborator Author

@Conni2461 thanks, I was getting very confused 😅
It's weird as its complaining about stuff that isn't even present in this PR

@l-kershaw l-kershaw merged commit edb76cc into nvim-lua:master Sep 19, 2021
@l-kershaw l-kershaw deleted the feat/popup_center branch September 19, 2021 16:23
@jesseleite
Copy link
Copy Markdown

@l-kershaw Oh rad, so this does the same thing as in my PR here nvim-lua/popup.nvim#9!?

@l-kershaw
Copy link
Copy Markdown
Collaborator Author

@jesseleite yeh, thanks for writing that PR!
This was heavily based on your version, I just refactored it slightly so that we could also use the centering just horizontally or just vertically, using col=0 or row=0 respectively (as is done in vim).

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.

3 participants