goolord / alpha-nvim

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

fix: replace line2byte check #239

Closed MariaSolOs closed 1 year ago

MariaSolOs commented 1 year ago

Fixes #238

This solution is inspired from mini.starter. Note how the comment there explains how @echasnovski had encountered a similar (?) issue using line2byte in the past.

technicalpickles commented 1 year ago

Fixes it for me 🎊

I was curious if the line for vim.fn.argc() >0 was needed from mini.starter, but I checked and it seems to correctly not show alpha when called like nvim file_1.txt file_2.txt etc

goolord commented 1 year ago

I was curious if the line for vim.fn.argc() >0 was needed

yes, that check already exists https://github.com/goolord/alpha-nvim/pull/239/files#diff-ec96159a0e4ab00d2629897381414ffd88f8e88aa0b82e2f8ba6e24da2873239R573

thank you for your contribution!