diff options
Diffstat (limited to 'src/pardes.zig')
| -rw-r--r-- | src/pardes.zig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pardes.zig b/src/pardes.zig index 239987ea..e20eb17e 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -1474,6 +1474,11 @@ test "a REPL bound for a language takes the exec made on a body in it; tags, Exe _ = exec.executeFrom(p, 0, "a = 1\r\nb = \x1b[201~2", true); Sent.drain(p); try std.testing.expectEqualStrings("a = 1\rb = [201~2\r", Sent.said(1)); + // A block left open by its indented last line gets the blank line that + // ends it: a second Enter. + _ = exec.executeFrom(p, 0, "def f():\n return 1", true); + Sent.drain(p); + 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); |
