oh-my-codex 0.21.9 → 0.21.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2694,31 +2694,32 @@ function upsertTuiStatusLine(config, preset = DEFAULT_STATUS_LINE_PRESET, option
2694
2694
  continue;
2695
2695
  }
2696
2696
  const key = keyMatch[1];
2697
+ // Accumulate all lines of the entry (handles multi-line arrays and values)
2698
+ const entryLines = [trimmed];
2699
+ while (!parseStandaloneToml(entryLines.join("\n")) &&
2700
+ i + 1 < section.end) {
2701
+ i += 1;
2702
+ entryLines.push(lines[i].trim());
2703
+ }
2704
+ const entryContent = entryLines.join("\n");
2697
2705
  if (key === "status_line") {
2698
- const entryLines = [trimmed];
2699
- while (!parseStandaloneToml(entryLines.join("\n")) &&
2700
- i + 1 < section.end) {
2701
- i += 1;
2702
- entryLines.push(lines[i].trim());
2703
- }
2704
- const statusLineEntry = entryLines.join("\n");
2705
2706
  const hasMarker = lastNonBlankBeforeStatusLine === OMX_MANAGED_STATUS_LINE_MARKER;
2706
- const isManagedByMarker = hasMarker && OMX_PRESET_STATUS_LINE_VALUES.has(statusLineEntry);
2707
- const isManagedByLegacyValue = !hasMarker && statusLineEntry === LEGACY_OMX_STATUS_LINE;
2707
+ const isManagedByMarker = hasMarker && OMX_PRESET_STATUS_LINE_VALUES.has(entryContent);
2708
+ const isManagedByLegacyValue = !hasMarker && entryContent === LEGACY_OMX_STATUS_LINE;
2708
2709
  const isOmxManagedStatusLine = isManagedByMarker || isManagedByLegacyValue;
2709
2710
  if (!options.forceStatusLinePreset || !isOmxManagedStatusLine) {
2710
- preservedStatusLine ??= statusLineEntry;
2711
+ preservedStatusLine ??= entryContent;
2711
2712
  }
2712
- lastNonBlankBeforeStatusLine = statusLineEntry;
2713
+ lastNonBlankBeforeStatusLine = entryContent;
2713
2714
  continue;
2714
2715
  }
2715
2716
  if (seenKeys.has(key)) {
2716
- lastNonBlankBeforeStatusLine = trimmed;
2717
+ lastNonBlankBeforeStatusLine = entryContent;
2717
2718
  continue;
2718
2719
  }
2719
2720
  seenKeys.add(key);
2720
- preservedKeyLines.push(trimmed);
2721
- lastNonBlankBeforeStatusLine = trimmed;
2721
+ preservedKeyLines.push(entryContent);
2722
+ lastNonBlankBeforeStatusLine = entryContent;
2722
2723
  }
2723
2724
  }
2724
2725
  // When OMX is supplying the status_line (no user-preserved value),