tui: keep trimming for normal submits; only raw ! triggers bash

This commit is contained in:
Vignesh Natarajan
2026-01-22 11:41:19 -08:00
committed by Peter Steinberger
parent 5fd699d0bf
commit 110b5dafee
4 changed files with 55 additions and 16 deletions

View File

@@ -22,7 +22,7 @@ describe("createEditorSubmitHandler", () => {
expect(editor.addToHistory).toHaveBeenCalledWith("hello world");
});
it("does not trim input before adding to history", () => {
it("trims input before adding to history", () => {
const editor = {
setText: vi.fn(),
addToHistory: vi.fn(),
@@ -37,7 +37,7 @@ describe("createEditorSubmitHandler", () => {
handler(" hi ");
expect(editor.addToHistory).toHaveBeenCalledWith(" hi ");
expect(editor.addToHistory).toHaveBeenCalledWith("hi");
});
it("does not add empty-string submissions to history", () => {