Terminal: tidy

This commit is contained in:
李通洲 2024-04-10 10:10:39 +08:00
parent 3f0ccf802c
commit bcbca38b1e
No known key found for this signature in database
GPG Key ID: 269AD4F5325A22A3
2 changed files with 3 additions and 2 deletions

View File

@ -160,7 +160,7 @@ static const char* detectFromWTImpl(FFstrbuf* content, FFstrbuf* name, double* s
#include <shlobj.h>
#endif
static void detectFromWindowsTeriminal(const FFstrbuf* terminalExe, FFTerminalFontResult* terminalFont)
static void detectFromWindowsTerminal(const FFstrbuf* terminalExe, FFTerminalFontResult* terminalFont)
{
//https://learn.microsoft.com/en-us/windows/terminal/install#settings-json-file
FF_STRBUF_AUTO_DESTROY json = ffStrbufCreate();
@ -432,7 +432,7 @@ static bool detectTerminalFontCommon(const FFTerminalResult* terminal, FFTermina
//Used by both Linux (WSL) and Windows
else if(ffStrbufIgnCaseEqualS(&terminal->processName, "Windows Terminal") ||
ffStrbufIgnCaseEqualS(&terminal->processName, "WindowsTerminal.exe"))
detectFromWindowsTeriminal(&terminal->exe, terminalFont);
detectFromWindowsTerminal(&terminal->exe, terminalFont);
#endif
else

View File

@ -260,6 +260,7 @@ static bool detectDefaultTerminal(FFTerminalResult* result)
if(ffPathExists(result->exe.chars, FF_PATHTYPE_FILE))
{
result->exeName = result->exe.chars + ffStrbufLastIndexC(&result->exe, '\\') + 1;
ffStrbufSet(&result->exePath, &result->exe);
}
else
{