diff options
Diffstat (limited to 'src/lsp/Ask.zig')
| -rw-r--r-- | src/lsp/Ask.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lsp/Ask.zig b/src/lsp/Ask.zig index 250d6dba..2ee33123 100644 --- a/src/lsp/Ask.zig +++ b/src/lsp/Ask.zig @@ -40,7 +40,7 @@ const TAG_TEXT_INSET = pardes.TAG_TEXT_INSET; pub fn lspRequest(p: *Pardes, asked: usize, kind: lsp.Kind, arg_in: []const u8) void { var arg = arg_in; - if (!normal.multiOnce(p)) return; // one question per keystroke, from the primary + if (!normal.multiOnce(p.editor())) return; // one question per keystroke, from the primary // Lspwhy narrates the last query where it was asked -- that pane's // file, place and argument -- from wherever it is run. const last_pane: ?usize = if (kind == .explain) (if (p.lsp_ask.last) |last| p.paneBySerial(last.serial) else null) else null; @@ -224,7 +224,7 @@ fn applyLspEdits(p: *Pardes, pane: *Pane, revision: u32, edits: []const LspEdit) } @memcpy(replacement[write_at..], f.content[read_at..]); - edit.pushUndo(p, &pane.body) catch { + edit.pushUndo(p.editor(), &pane.body) catch { p.gpa.free(replacement); return false; }; @@ -308,7 +308,7 @@ pub fn lspResponse(p: *Pardes, id: u32, response: ?[]const u8) void { } if (rows.len == 0) { if (w.kind == .completion and pane.body.mode == .insert and pane.body.nsel == 0 and - pane.body.cur_row == w.row and pane.body.cur_col == w.col) edit.insertTab(p, &pane.body) catch |err| return p.reportError(w.pane, "complete", err); + pane.body.cur_row == w.row and pane.body.cur_col == w.col) edit.insertTab(p.editor(), &pane.body) catch |err| return p.reportError(w.pane, "complete", err); // Nothing found fails, but for a file with no diagnostics, // which is no failure, and a completion's Tab. const none: ?[]const u8 = switch (w.kind) { |
