summaryrefslogtreecommitdiff
path: root/ted.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-12-30 14:21:35 -0500
committerpommicket <pommicket@gmail.com>2022-12-30 14:21:35 -0500
commit91fc9b10e1700b482b13af1d25d95d80085a9b79 (patch)
tree8873099c6de0cefe8304f1d04c7be349e3e189ab /ted.c
parent66367583a3b57e37e9198838222f45d99e77d8ae (diff)
go to definition
Diffstat (limited to 'ted.c')
-rw-r--r--ted.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ted.c b/ted.c
index 0bf0668..e98348d 100644
--- a/ted.c
+++ b/ted.c
@@ -535,6 +535,7 @@ void ted_go_to_position(Ted *ted, const char *path, u32 line, u32 index, bool is
}
void ted_go_to_lsp_document_position(Ted *ted, LSP *lsp, LSPDocumentPosition position) {
+ if (!lsp) lsp = ted_active_lsp(ted);
const char *path = lsp_document_path(lsp, position.document);
u32 line = position.pos.line;
u32 character = position.pos.character;