TerminalShell: fix terminal name detection on NixOS

oops. No one report that...
This commit is contained in:
李通洲
2023-11-08 09:02:52 +08:00
parent 3e0d97db2e
commit f93341ac61
@@ -361,13 +361,13 @@ const FFTerminalShellResult* ffDetectTerminalShell()
ffStrbufInitS(&result.shellPrettyName, result.shellExeName);
}
if(result.terminalExeName[0] == '.' && ffStrEndsWith(result.terminalExeName, "-wrapper"))
if(result.terminalExeName[0] == '.' && ffStrEndsWith(result.terminalExeName, "-wrapped"))
{
// For NixOS. Ref: #510 and https://github.com/NixOS/nixpkgs/pull/249428
// We use terminalProcessName when detecting version and font, overriding it for simplication
ffStrbufSetNS(
&result.terminalProcessName,
(uint32_t) (strlen(result.terminalExeName) - strlen(".-wrapper")),
(uint32_t) (strlen(result.terminalExeName) - strlen(".-wrapped")),
result.terminalExeName + 1);
}