Browse Source

Minor fix to: go to declaration.

merge-requests/365/head
eidheim 11 years ago
parent
commit
f558a8ad6a
  1. 2
      juci/source.cc

2
juci/source.cc

@ -807,7 +807,7 @@ Source::ClangViewAutocomplete(file_path, project_path) {
std::pair<std::string, unsigned> location; std::pair<std::string, unsigned> location;
if(clang_readable) { if(clang_readable) {
for(auto &token: *clang_tokens) { for(auto &token: *clang_tokens) {
if(token.has_type()) { if(token.get_kind()==clang::Token_Identifier && token.has_type()) {
auto insert_offset=(unsigned)get_buffer()->get_insert()->get_iter().get_offset(); auto insert_offset=(unsigned)get_buffer()->get_insert()->get_iter().get_offset();
if(insert_offset>=token.offsets.first && insert_offset<=token.offsets.second) { if(insert_offset>=token.offsets.first && insert_offset<=token.offsets.second) {
auto referenced=token.get_cursor().get_referenced(); auto referenced=token.get_cursor().get_referenced();

Loading…
Cancel
Save