nvim-lualine / lualine.nvim

A blazing fast and easy to configure neovim statusline plugin written in pure lua.
MIT License
5.89k stars 459 forks source link

Progress component changes size while scrolling #849

Closed miguelbarao closed 1 year ago

miguelbarao commented 1 year ago

Self Checks

How to reproduce the problem

Default settings

Expected behaviour

The progress component should have a fixed size

Actual behaviour

Progress is 3 chars wide for Top, Bot, 10% up to 99%, except between 1% and 9%. This makes the component change size, which affect the position of other components on the lualine. This "jumping" is distracting when scrolling.

Aditional information

This can be fixed by changing lua/lualine/components/progress.lua and change line 11 to something like

    return string.format('%2d%%%%', math.floor(cur / total * 100))
rs-loves-bugs commented 1 year ago

I can't believe more people are not annoyed by this, thanks for providing a fix.