diff options
Diffstat (limited to 'core/lsp/Ask.zig')
| -rw-r--r-- | core/lsp/Ask.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/lsp/Ask.zig b/core/lsp/Ask.zig index c60eb72b..2f92f4dd 100644 --- a/core/lsp/Ask.zig +++ b/core/lsp/Ask.zig @@ -792,14 +792,14 @@ test "SPC l r types the new name in the pane's own tag, the body showing each pl var frame = std.heap.ArenaAllocator.init(std.testing.allocator); defer frame.deinit(); const a = frame.allocator(); - try std.testing.expect(std.mem.indexOf(u8, try pardes.tagline.tagText(p, a, pane), "Rename best → bester") != null); + try std.testing.expect(std.mem.indexOf(u8, (try pardes.TagState.head(p, a, pane)).?.text, "Rename best → bester") != null); p.sync(); const sf = try p.render(a); const body = sf.region(.body, id).?.rect; var buf: [256]u8 = undefined; // Each `best` in view struck and followed by the new name; `bestow` is - // another word. - try std.testing.expect(std.mem.indexOf(u8, rowText(sf, body.x, body.y, &buf), "const bestbester = 1;") != null); + // another word. The first line is under the head's row (UX DESIGN M2). + try std.testing.expect(std.mem.indexOf(u8, rowText(sf, 0, body.y, &buf), "Rename best → bester") != null); try std.testing.expect(std.mem.indexOf(u8, rowText(sf, body.x, body.y + 1, &buf), "const b = bestbester + bestbester;") != null); try std.testing.expect(std.mem.indexOf(u8, rowText(sf, body.x, body.y + 2, &buf), "const bestow = 2;") != null); try std.testing.expectEqualStrings("const best = 1;\nconst b = best + best;\nconst bestow = 2;\n", pane.file.?.content); |
