Terminal (Linux): improve performance of Tilix version detection

Fix #1550
This commit is contained in:
Carter Li committed 2025-02-10 09:15:55 +08:00
1 parent 339e08fef1
commit 85ed4b136f
2 files changed
+7

No files matched your search

@@ -669,6 +669,12 @@ FF_MAYBE_UNUSED static bool getTerminalVersionPtyxis(FF_MAYBE_UNUSED FFstrbuf* e
FF_MAYBE_UNUSED static bool getTerminalVersionTilix(FFstrbuf* exe, FFstrbuf* version)
{
if (exe->chars[0] == '/')
{
ffBinaryExtractStrings(exe->chars, extractGeneralVersion, version, (uint32_t) strlen("0.0.0"));
if (version->length) return true;
}
if(ffProcessAppendStdOut(version, (char* const[]) {
exe->chars,
"--version",