From b5761b5980516086a75601d856b9d99f42d62453 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 17 Jan 2018 12:52:37 -0800 Subject: [PATCH] Fix textDocument/definition on #include lines --- src/indexer.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/indexer.cc b/src/indexer.cc index 59e1d037..efa5dfb6 100644 --- a/src/indexer.cc +++ b/src/indexer.cc @@ -637,6 +637,7 @@ CXIdxClientFile OnIndexIncludedFile(CXClientData client_data, CXFile cx_file; unsigned int line; clang_getSpellingLocation(hash_loc, &cx_file, &line, nullptr, nullptr); + line--; IndexFile* db = ConsumeFile(param, cx_file); if (!db)