mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -05:00
Bug 885: Truncate title at 600 bytes, not 1024.
Although xterm allows 1024 bytes, GNU Screen apparently has a lower limit.
This commit is contained in:
parent
29c34df62e
commit
8d19b87cb1
@ -447,9 +447,16 @@ set_window_title(unsigned char *title, int codepage)
|
|||||||
|| (unicode >= 0x7F && unicode < 0xA0))
|
|| (unicode >= 0x7F && unicode < 0xA0))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* xterm entirely rejects 1024-byte or longer
|
/* If the title is getting too long, truncate
|
||||||
* titles. */
|
* it and add an ellipsis.
|
||||||
if (filtered.length + charlen >= 1024 - 3) {
|
*
|
||||||
|
* xterm entirely rejects 1024-byte or longer
|
||||||
|
* titles. GNU Screen 4.00.03 misparses
|
||||||
|
* titles longer than 765 bytes, and is unable
|
||||||
|
* to display the title in hardstatus if the
|
||||||
|
* title and other stuff together exceed 766
|
||||||
|
* bytes. So set the limit quite a bit lower. */
|
||||||
|
if (filtered.length + charlen >= 600 - 3) {
|
||||||
add_to_string(&filtered, "...");
|
add_to_string(&filtered, "...");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user