fix(settings): clarify apply_env_overrides comment — env always wins
The previous comment incorrectly suggested that a user-set low_motion=false in the settings file could override the TERM_PROGRAM=vscode detection. In fact, apply_env_overrides() runs after disk load and unconditionally sets the flag, identical to the existing NO_ANIMATIONS precedent. Update the comment to state the actual precedence clearly. Signed-off-by: CrepuscularIRIS <serenitygp@qq.com>
This commit is contained in:
committed by
Hunter Bown
parent
5bededf77c
commit
3b1d0ae907
@@ -318,10 +318,9 @@ impl Settings {
|
||||
}
|
||||
// VS Code's integrated terminal sets TERM_PROGRAM=vscode. Its
|
||||
// compositor cannot keep up with 120 FPS redraws and produces rapid
|
||||
// flickering (#1356). Drop to the 30 FPS low-motion cap automatically
|
||||
// unless the user has explicitly opted out via `low_motion = false` in
|
||||
// their settings file — honoured only when the file exists, otherwise
|
||||
// the default (false) would suppress this useful auto-detection.
|
||||
// flickering (#1356). Drop to the 30 FPS low-motion cap automatically.
|
||||
// Like NO_ANIMATIONS above, this unconditionally overrides any
|
||||
// disk-loaded value — consistent precedence: env signals always win.
|
||||
if std::env::var("TERM_PROGRAM").as_deref() == Ok("vscode") {
|
||||
self.low_motion = true;
|
||||
self.fancy_animations = false;
|
||||
|
||||
Reference in New Issue
Block a user