Only set default for TerminalHyperlinks if it hasn't explicitly been set

(for example, with '-i$TerminalHyperlinks=n')
This commit is contained in:
Dianne Skoll
2026-01-11 10:58:30 -05:00
parent c43eaec274
commit 85a8a4b016
2 changed files with 7 additions and 3 deletions
+6 -2
View File
@@ -851,8 +851,12 @@ void InitRemind(int argc, char const *argv[])
}
/* If stdout is a tty, enable terminal hyperlinks by default */
if (isatty(STDOUT_FILENO)) {
TerminalHyperlinks = 1;
if (TerminalHyperlinks == -1) {
if (isatty(STDOUT_FILENO)) {
TerminalHyperlinks = 1;
} else {
TerminalHyperlinks = 0;
}
}
}