b0o / incline.nvim

🎈 Floating statuslines for Neovim, winbar alternative
MIT License
759 stars 14 forks source link

wrong position of window line when setting `width = 'fill'` unless setting `placement.horizontal = 'center'` #11

Closed milanglacier closed 2 years ago

milanglacier commented 2 years ago

example config:

require('incline').setup {
        window = {
            width = 'fill',
            placement = {
                vertical = 'bottom',
            },
            margin = {
                horizontal = {
                    left = 0,
                    right = 0,
                },
            },
            padding = {
                left = 0,
                right = 0,
            },
        },
    }

when there are two windows, the window line for the window that is focused is left shifted (my focus is on the right window):

Screen Shot 2022-05-05 at 03 13 08

however, adding placement,horizontal = 'center' solves the issue. I guess the inner logic doesn't handle the width = fill case with placement.horizontal

b0o commented 2 years ago

Thanks for reporting! Can you test the latest commit and let me know if that fixes your issue?