GNU bug report logs -
#37667
27.0.50; Tab Bar display problems with more than 5 tabs
Previous Next
Full log
Message #71 received at 37667 <at> debbugs.gnu.org (full text, mbox):
>> But the first question popped up quickly: I don't understand
>> how to detect the situation where the tab-line is truncated?
>
> The situation that it's truncated, or the situation that it _needs_ to
> be truncated, i.e. the next tab doesn't fit on the line?
>
> If the former, the glyph_row->truncated_on_right_p flag should be set.
> You can see it being set in display_string, which is called from
> display_mode_line.
>
> If you mean the latter, then look how the truncated_on_right_p flag is
> being set in display_line or in other similar display functions, like
> display_tab_bar_line.
>
>> And how to find the tab that is visible partially?
>> Especially when the font is variable-pitch.
>
> I think you will need to walk the glyphs in the tab-line looking for
> the last glyph whose character position has the property you put on
> tabs in tab-line (as specified in by tab-line-format). Or maybe
> tab-line-format should put some special property on the last glyph of
> a tab, so that you could look for it more easily?
>
> Let me know if the above is not detailed enough to get you off the
> ground.
Thanks for the explanation. One thing that I still don't understand is
how to find the exact position in the mode-line string where it's
truncated. For example, in the string "...abc|xyz", the part
until "abc" is visible, but the rest of the string is truncated,
so "xyz" is not visible. How to find this position where truncation occurs?
Actually, it seems I found it, it's it.last_visible_x. Is this correct?
This bug report was last modified 4 years and 276 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.