goolord / alpha-nvim

a lua powered greeter like vim-startify / dashboard-nvim
MIT License
1.82k stars 109 forks source link

Text highlighting doesn't begin at the first character #120

Closed Zaedus closed 2 years ago

Zaedus commented 2 years ago

I found this really cool title I really like, but the only way it works is if I set the exact start and end character from the very left edge of the window like so:

{{"Title", 0, -1}, {"PmenuSel", 101, 111}}

image The best idea I can come up with for me right now is to calculate it based on the number of columns in the current window, but that won't automatically adjust to a new window width. Is this a bug or is there a something I'm missing?

goolord commented 2 years ago

should be fixed in https://github.com/goolord/alpha-nvim/commit/84a1969725247613348f7f1a2ed84dc2ec61d35b

thanks for spotting this, i really have to reduce duplication so that stuff like this doesn't slip through :V

Zaedus commented 2 years ago

Wow! As I was messing with my config I was wondering "why did my cool title suddenly break?" Thanks for the fast fix!

Zaedus commented 2 years ago

Also, you miiiight've left a debug print in there.

goolord commented 2 years ago

oopsies

goolord commented 2 years ago

the joys of printf debugging 😞https://github.com/goolord/alpha-nvim/commit/411ce27d871f963256c0787bc4133cf945dd89d3

Zaedus commented 2 years ago

Yay! Its all up and running, and now it still works even if I resize the window! Thank you so much! image