summaryrefslogtreecommitdiff
path: root/src/Effect.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-17 05:53:16 -0300
committerGabriel Schneider <[email protected]>2026-11-17 12:15:01 -0300
commit3dd2072fc525cdadf4f55a69f745c73c0b8c2b21 (patch)
treebbde59afec92eab134c9d8db248ff9369530d952 /src/Effect.zig
parent2b04f877c29cf1e95c2fc8154de1da322c7299a3 (diff)
downloadpardes-3dd2072fc525cdadf4f55a69f745c73c0b8c2b21.tar.gz
pardes-3dd2072fc525cdadf4f55a69f745c73c0b8c2b21.zip
edit: the edits of a text take the editing context (docs/next-editor.md, R2, second slice): enterInsert, exitInsert, handleInsert, insertKey, insertEdit, insertTab, pasteRegister, pasteText, normalDelete, normalYank, normalChange, deleteSelection, setEditCells, normalReplaceChar, chordReplace, replaceWithText, normalCase, normalJoin, normalRotateContents, normalAlign, normalIndent, normalToggleComment, normalAdjustNumber, addNewline, textobjectSelect and the three surrounds take `e: Editor`; insertEdit's splice end is `stop` and a comment extension `x` where they were `e`; 71 calls in 8 files hand `p.editor()`; core-test 810 of 949, shell-test 989 of 992, hxdiff 658 / parity 738 / hxgolf 124 with 0 mismatches, replicas pass
Diffstat (limited to 'src/Effect.zig')
-rw-r--r--src/Effect.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Effect.zig b/src/Effect.zig
index 08694e93..344034e2 100644
--- a/src/Effect.zig
+++ b/src/Effect.zig
@@ -364,7 +364,7 @@ test "Save on a scratch asks for a path in its inherited dir and makes it a file
try std.testing.expectEqualStrings(" Save /tmp/pardes-save-dir/", np.promptText().?);
// typing the filename and submitting converts it into an ordinary file
- try edit.insertKey(p, &np.input, .{ .cp = 'n', .text = "note.txt" });
+ try edit.insertKey(p.editor(), &np.input, .{ .cp = 'n', .text = "note.txt" });
exec.submitSave(p, id);
// The write asked for, the pane is the file once it is done.
var saved = false;
@@ -390,7 +390,7 @@ test "Save on a terminal writes its plaintext scrollback and stays a terminal" {
try std.testing.expect(p.executeBuiltinLine(0, "Save"));
try std.testing.expect(pane.prompt == .save);
- try edit.insertKey(p, &pane.input, .{ .cp = 'l', .text = "log.txt" });
+ try edit.insertKey(p.editor(), &pane.input, .{ .cp = 'l', .text = "log.txt" });
exec.submitSave(p, 0);
// the pane is untouched: still a terminal, no file behind it
@@ -440,7 +440,7 @@ test "Save on an output buffer writes its rows out and leaves the buffer alone"
try std.testing.expectEqualStrings(tagline.file_pane_tail, tagline.curTail(out));
try std.testing.expect(p.executeBuiltinLine(id, "Save"));
try std.testing.expect(out.prompt == .save);
- try edit.insertKey(p, &out.input, .{ .cp = 'h', .text = "help.txt" });
+ try edit.insertKey(p.editor(), &out.input, .{ .cp = 'h', .text = "help.txt" });
exec.submitSave(p, id);
// the buffer itself is untouched: same origin, same name, still refillable