ui icon indicating copy to clipboard operation
ui copied to clipboard

Fix visible tabs

Open romanschulz opened this issue 1 year ago • 7 comments

Now all the space is not used enough. The total length of one tab is 21 characters, therefore it is necessary to adjust the calculation of which tabs can be displayed and which ones cannot. Also modify the padding calculation for a tab length of 21 characters.

romanschulz avatar Mar 27 '24 08:03 romanschulz

Can we also put that magic number 21 to the top of that file (or somewhere else), then use it? This doesn't seem maintainable

lucario387 avatar Mar 27 '24 09:03 lucario387

of course, I created a local constant BUF_WIDTH, which I use in both places

romanschulz avatar Mar 27 '24 10:03 romanschulz

the total length of a tab was 23 before, why 21?

siduck avatar Mar 27 '24 11:03 siduck

:fearful:

siduck avatar Mar 27 '24 12:03 siduck

why are we closing this @romanschulz

You can change it back

lucario387 avatar Mar 27 '24 13:03 lucario387

I tried to determine the exact width of the panel for the buffer, because I think it is little bit smaller than the mentioned 23 characters, I just don't know if it is always... sometimes I counted 21 and now I saw that it can be 22 characters. When I think about it, it is the sum of: space + icon + space + 15 characters of the filename (or 16?) + space + X button + space = 21 (or 22)

image

romanschulz avatar Mar 27 '24 14:03 romanschulz

@romanschulz pr looks right, just lowecase the variable buf_width

siduck avatar Jun 09 '24 15:06 siduck