summaryrefslogtreecommitdiff
path: root/src/Core.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Core.zig')
-rw-r--r--src/Core.zig6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Core.zig b/src/Core.zig
index ecfd8fa7..9ba448be 100644
--- a/src/Core.zig
+++ b/src/Core.zig
@@ -438,6 +438,10 @@ pub const setMessage = Messages.setMessage;
pub const reportError = Messages.reportError;
pub const reportFailure = Messages.reportFailure;
+/// What an edit of a text runs with (Editor.zig), gathered from this core:
+/// called from everywhere as `edit.f(p.editor(), t, ...)`.
+pub const editor = pardes.Editor.of;
+
/// Running a builtin line, called from everywhere as
/// `p.executeBuiltinLine(...)`; it lives with the rest of exec in exec.zig.
pub const executeBuiltinLine = exec.executeBuiltinLine;
@@ -2918,7 +2922,7 @@ test "a REPL bound for a language takes the exec made on a body in it; tags, Exe
try std.testing.expectEqualStrings("def f():\r return 1\r\r", Sent.said(1));
// Several selections executed at once: each is sent, not the first.
{
- const text = try edit.flatSurface(p, &file.body);
+ const text = try edit.flatSurface(p.editor(), &file.body);
file.body.setRanges(text, &.{ .{ .anchor = 0, .head = 8 }, .{ .anchor = 9, .head = 11 } }, &.{}, 0, true);
try std.testing.expect(exec.chordEachSel(p, file, .Exec));
Sent.drain(p);