Commit 5f8e71039fb0a1ec6a33855fa38c3585c344e4d3
Fix 'title' not using tsl and fsl consistently
They were used only for restoring the title but not for setting it.
Not sure how come 3622d9ac8bf359916767589d0bfa66284fbbb3a6 did this
halfway:
Make 'title' option work for more terminals
Support any terminal which have "tsl" and "fsl" capabilities.
Thanks to m-kru.
Fixes #536 on GitHub.
Apparently, I didn't test it that time (not sure which usable terminals
have these, so still untested on my side).
Author: xaizek
Author date (UTC): 2026-07-11 07:37
Committer name: xaizek
Committer date (UTC): 2026-07-11 12:48
Parent(s): a43e2e36f1667c2cecc4b547953fd1204238bb01
Signing key: 99DC5E4DB05F6BE2
Tree: 68062a38c9fc31cd788d9effd29cee1a1ea5eb1a
| File ChangeLog changed (mode: 100644) (index 137fca16d..17ddd924d) |
| 272 |
272 |
Fixed invocation form of :locate that passes parameters without escaping |
Fixed invocation form of :locate that passes parameters without escaping |
| 273 |
273 |
not being documented. |
not being documented. |
| 274 |
274 |
|
|
|
275 |
|
Fixed implementation of 'title' using tsl and fsl attributes from terminfo |
|
276 |
|
only for restoring the title but not for setting it. |
|
277 |
|
|
| 275 |
278 |
0.14-beta to 0.14 (2025-02-08) |
0.14-beta to 0.14 (2025-02-08) |
| 276 |
279 |
|
|
| 277 |
280 |
Improved documentation on zh/zl menu keys a bit. |
Improved documentation on zh/zl menu keys a bit. |
| File src/int/term_title.c changed (mode: 100644) (index 74f840eb1..5bb177219) |
| ... |
... |
set_terminal_title(const char path[]) |
| 395 |
395 |
SetConsoleTitleW(utf16); |
SetConsoleTitleW(utf16); |
| 396 |
396 |
free(utf16); |
free(utf16); |
| 397 |
397 |
#else |
#else |
| 398 |
|
char *const fmt = (title_state.kind == TK_REGULAR) |
|
| 399 |
|
? "\033]2;%.*s - VIFM\007" |
|
| 400 |
|
: "\033k%.*s - VIFM\033\134"; |
|
| 401 |
|
char *const title = format_str(fmt, MAX_TITLE_MSG_LEN, path); |
|
|
398 |
|
char *const title = format_str("%.*s - VIFM", MAX_TITLE_MSG_LEN, path); |
| 402 |
399 |
|
|
|
400 |
|
/* Apparently tsl can take column in some cases. */ |
|
401 |
|
putp(tgoto(title_state.tsl, 0, 0)); |
| 403 |
402 |
putp(title); |
putp(title); |
|
403 |
|
putp(title_state.fsl); |
| 404 |
404 |
fflush(stdout); |
fflush(stdout); |
| 405 |
405 |
|
|
| 406 |
406 |
free(title); |
free(title); |