fix: keep arrow keys and tab inside editor mode

This commit is contained in:
Erik Kotsiuba
2026-04-19 16:32:27 +02:00
parent bc92712053
commit cdea90bbfe
5 changed files with 46 additions and 26 deletions
+9 -1
View File
@@ -1,6 +1,9 @@
import assert from "node:assert/strict";
import test from "node:test";
import { renderEditorBlock } from "../src/ui/render-helpers.ts";
import {
renderEditorBlock,
renderFooterText,
} from "../src/ui/render-helpers.ts";
const ABC_PATTERN = /abc/;
const BORDER_PATTERN = /┌|└/;
@@ -69,3 +72,8 @@ test("renderEditorBlock reapplies background after editor reset sequences", () =
assert.match(lines[0], SELECTED_BG_PATTERN);
assert(lines[0].includes("\x1b[0m{selectedBg}"));
});
test("editing footers do not advertise tab navigation", () => {
assert.equal(renderFooterText("input"), " Enter submit · Esc save and close");
assert.equal(renderFooterText("note"), " Enter save · Esc save and close");
});