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

fix: Show intro message when the ui command msg_intro is received #1985

Merged
merged 3 commits into from Aug 30, 2023

Conversation

fredizzimo
Copy link
Member

@fredizzimo fredizzimo commented Aug 20, 2023

msg_intro is now used to show the intro message, when it's available. That will happen once this Neovim PR is merged and released neovim/neovim#24764. Otherwise the message text it built manually like before, and showed using VimEnter

In addition to this it fixes these two issues

  • The shortmess+=I` option now works
  • The message now closes properly when using dashboard-nvim. And most likely in some other situations that did not work previously. The issue was that the lazy loading of packer.nvim (and maybe lazy.nvim) with event=VimEnter causes VimEnterto be called twice.

It also changes the use of lua random to VIM random to avoid polluting the global lua random seed.

Did this PR introduce a breaking change?

A breaking change includes anything that breaks backwards compatibility either at compile or run time.

  • No

@fredizzimo fredizzimo changed the title feat: Show intro message when the ui_command msg_intro is recieved feat: Show intro message when the ui command msg_intro is recieved Aug 20, 2023
@MultisampledNight MultisampledNight changed the title feat: Show intro message when the ui command msg_intro is recieved feat: Show intro message when the ui command msg_intro is received Aug 21, 2023
This only works on Neovim >=0.9.2, so on older versions the message is
built like before.

Also respect the shortmess I option and use Vim instead of lua for
random to avoid polluting the global seed.
VimEnter can be called many times when using Lazy loading, which breaks
the intro message.
@fredizzimo fredizzimo marked this pull request as ready for review August 27, 2023 16:23
@fredizzimo fredizzimo changed the title feat: Show intro message when the ui command msg_intro is received fix: Show intro message when the ui command msg_intro is received Aug 29, 2023
Copy link
Contributor

@MultisampledNight MultisampledNight left a comment

Choose a reason for hiding this comment

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

Thank you! Chooooooo chooooooo 🚂

@MultisampledNight MultisampledNight merged commit 577b068 into neovide:main Aug 30, 2023
2 checks passed
@fredizzimo fredizzimo mentioned this pull request Sep 7, 2023
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.

None yet

2 participants