From da666602adb5be5ca803165645c30a79399f462d Mon Sep 17 00:00:00 2001 From: rrueger Date: Fri, 9 Aug 2024 10:11:05 +0200 Subject: Add g:statusryne_adaptive_padding option When set to 1, statusryne will pad the names of items in the tabline so that they are all the same width. Else, only some constant padding is added. --- plugin/statusryne.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugin/statusryne.vim b/plugin/statusryne.vim index 4b48024..c0ea3d8 100644 --- a/plugin/statusryne.vim +++ b/plugin/statusryne.vim @@ -377,7 +377,12 @@ function! TabLine() " Number of buffers in tab. let t:bcount = len(tabpagebuflist(t+1)) " Total amount of whitespace to fill, after considering curent tab label. - let t:remainder = g:maxlabellen - len(g:tablabels[t]) + if exists("g:statusryne_adaptive_padding") && g:statusryne_adaptive_padding == "1" + " Total amount of whitespace to fill, after considering curent tab label. + let t:remainder = g:maxlabellen - len(g:tablabels[t]) + else + let t:remainder = 0 + endif let t:pad = t:remainder /2 + g:padding " Iter over buffers in tab. -- cgit v1.2.3-70-g09d2