mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-04 08:17:17 -05:00
Bug 1061: Correctly truncate UTF-8 titles in the tab bar.
This commit is contained in:
parent
8d19b87cb1
commit
e5722ad0d9
1
NEWS
1
NEWS
@ -21,6 +21,7 @@ includes the changes listed under ``ELinks 0.11.5.GIT'' below.
|
||||
option to disable this. When removing control characters from a
|
||||
title, note the charset. Don't truncate titles to the width of the
|
||||
terminal.
|
||||
* bug 1061: Correctly truncate UTF-8 titles in the tab bar.
|
||||
* enhancement: Updated ISO 8859-7, ISO 8859-16, KOI8-R, and MacRoman.
|
||||
|
||||
ELinks 0.12pre2:
|
||||
|
@ -359,7 +359,16 @@ display_tab_bar(struct session *ses, struct terminal *term, int tabs_count)
|
||||
box.x, box.y, actual_tab_width,
|
||||
msg, NULL);
|
||||
} else {
|
||||
int msglen = int_min(strlen(msg), actual_tab_width);
|
||||
int msglen;
|
||||
#ifdef CONFIG_UTF8
|
||||
if (term->utf8_cp) {
|
||||
msglen = utf8_step_forward(msg, NULL,
|
||||
actual_tab_width,
|
||||
UTF8_STEP_CELLS_FEWER,
|
||||
NULL) - msg;
|
||||
} else
|
||||
#endif /* CONFIG_UTF8 */
|
||||
msglen = int_min(strlen(msg), actual_tab_width);
|
||||
|
||||
draw_text(term, box.x, box.y, msg, msglen, 0, color);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user