squadrant 0.13.4 → 0.13.5

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.
@@ -4395,6 +4395,27 @@ function parseDraftFromScreen(screen) {
4395
4395
  }
4396
4396
  return "";
4397
4397
  }
4398
+ function hasModalOptionList(screen) {
4399
+ if (!screen)
4400
+ return false;
4401
+ const lines = screen.split(/\r?\n/);
4402
+ const HR_RE = /^\s*─{10,}\s*$/;
4403
+ let bottomHR = -1;
4404
+ let topHR = -1;
4405
+ for (let i = lines.length - 1; i >= 0; i--) {
4406
+ if (HR_RE.test(lines[i])) {
4407
+ if (bottomHR === -1)
4408
+ bottomHR = i;
4409
+ else {
4410
+ topHR = i;
4411
+ break;
4412
+ }
4413
+ }
4414
+ }
4415
+ if (topHR === -1)
4416
+ return false;
4417
+ return lines.slice(topHR + 1, bottomHR).some((l) => /^\s*\d+\.\s/.test(l));
4418
+ }
4398
4419
  function readInputBoxRaw(screen, opts) {
4399
4420
  if (!screen)
4400
4421
  return null;
@@ -4639,6 +4660,8 @@ function createCmuxDriver() {
4639
4660
  const draft = parseDraftFromScreen(screen);
4640
4661
  if (draft === null)
4641
4662
  throw new DeferDelivery(null);
4663
+ if (hasModalOptionList(screen))
4664
+ throw new DeferDelivery(null);
4642
4665
  if (draft === "") {
4643
4666
  await deliver();
4644
4667
  return;