Separator: honors FQDN settings in Title module

This commit is contained in:
李通洲
2025-08-14 13:30:02 +08:00
parent e80bb480c4
commit 0fe3db419e
4 changed files with 4 additions and 3 deletions
+1 -2
View File
@@ -56,7 +56,6 @@ void ffPrintSeparator(FFSeparatorOptions* options)
{
setlocale(LC_CTYPE, "");
mbstate_t state = {};
bool fqdn = true; // TODO: Make this configurable
const FFPlatform* platform = &instance.state.platform;
FF_AUTO_FREE wchar_t* wstr = malloc((max(
@@ -64,7 +63,7 @@ void ffPrintSeparator(FFSeparatorOptions* options)
uint32_t titleLength = 1 // @
+ getWcsWidth(&platform->userName, wstr, &state) // user name
+ (fqdn ? platform->hostName.length : ffStrbufFirstIndexC(&platform->hostName, '.')); // host name
+ (instance.state.titleFqdn ? platform->hostName.length : ffStrbufFirstIndexC(&platform->hostName, '.')); // host name
if(__builtin_expect(options->string.length == 1, 1))
{