We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2eb8bea + 0085e27 commit 3e3872aCopy full SHA for 3e3872a
core/Util/Util.vala
@@ -367,8 +367,9 @@ public class Util : GLib.Object {
367
public string get_short_name (string name, int size = Constants.SHORT_NAME_SIZE) {
368
string returned = name;
369
370
- if (name.length > size) {
371
- returned = name.slice (0, size) + "…";
+ int char_count = name.char_count ();
+ if (char_count > size) {
372
+ returned = name.substring (0, name.index_of_nth_char (size)) + "…";
373
}
374
375
return returned;
0 commit comments