diff --git a/hooks/ponytail-activate.js b/hooks/ponytail-activate.js index 9610721..51aca92 100644 --- a/hooks/ponytail-activate.js +++ b/hooks/ponytail-activate.js @@ -43,7 +43,9 @@ let output = getPonytailInstructions(mode); if (!isCodex) try { let hasStatusline = false; if (fs.existsSync(settingsPath)) { - const settings = JSON.parse(fs.readFileSync(settingsPath, 'utf8')); + // Strip UTF-8 BOM some editors prepend on Windows (breaks JSON.parse) + const raw = fs.readFileSync(settingsPath, 'utf8').replace(/^\uFEFF/, ''); + const settings = JSON.parse(raw); if (settings.statusLine) { hasStatusline = true; }