From bcbca38b1ecbfabd896dd9b506166e3551a4fa52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Wed, 10 Apr 2024 10:10:39 +0800 Subject: [PATCH] Terminal: tidy --- src/detection/terminalfont/terminalfont.c | 4 ++-- src/detection/terminalshell/terminalshell_windows.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/detection/terminalfont/terminalfont.c b/src/detection/terminalfont/terminalfont.c index 2c751a382..78609ef9c 100644 --- a/src/detection/terminalfont/terminalfont.c +++ b/src/detection/terminalfont/terminalfont.c @@ -160,7 +160,7 @@ static const char* detectFromWTImpl(FFstrbuf* content, FFstrbuf* name, double* s #include #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 diff --git a/src/detection/terminalshell/terminalshell_windows.c b/src/detection/terminalshell/terminalshell_windows.c index ed6e0be5e..11f5c4c71 100644 --- a/src/detection/terminalshell/terminalshell_windows.c +++ b/src/detection/terminalshell/terminalshell_windows.c @@ -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 {