Sublime Forum

The show_quick_panel overlay often truncates the longest string

#1

@stdarkstar
@fico

stdarkstar and fico have discussed a related problem in this thread.

  • Using ST 3 build 3114 on Linux Mint.

With the default ST theme, the show_quick_panel() overlay often truncates the string of the longest displayed item when the number of characters of the longest item is greater than about 45 characters. Strangely it is very inconsistent, sometimes a string of 50 characters will be truncated while at other times a string of even 100 characters will not be.

In the 4 installed themes that I’ve tested it with (Predawn, Soda, SoDaReloaded, and Spacegray) the situation is worse. The majority of the time if the longest string is about 45 characters or longer then it will be truncated. [I’m pretty sure that this is due to the extra border width that these themes add to the overlay.]

Regardless of whether the default theme or an installed theme is in use, it is always only the longest displayed item that gets truncated. ST automatically resizes the width of the show_quick_panel() so that everything fits except for the longest item.





To resolve this for my plugin, I’ve tried adding spaces and tabs to the end of the longest item, unfortunately this does not work. The extra space is added but the truncated string remains, just with extra ‘space’ after it. The 1st image below has had 8 spaces added, the 2nd has had 4 tabs added (\t\t\t\t).


Adding an extra row, which is longer than the longest item, does work but looks unsightly and it is tricky to tell how much extra space is needed so that it is only longer by just the right amount. This would probably be easier with sublime.MONOSPACE_FONT in use but I’m looking for a solution that does not require that to be used (only optionally).


Can anyone suggest ways of resolving this problem so that the longest item does not get truncated at all but without having to use the extra long unsightly row?

Thanks.

2 Likes

#2
0 Likes

#3

This was fixed in build 3127. :slight_smile:

0 Likes