From 742e22fe525a683fd9c26feb49063239c52a5b8d Mon Sep 17 00:00:00 2001 From: eidheim Date: Wed, 22 Jul 2015 17:35:50 +0200 Subject: [PATCH] Abit less eager tooltips and marking of similar tokens. --- juci/source.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/juci/source.cc b/juci/source.cc index a57ac0c..8c6dec0 100644 --- a/juci/source.cc +++ b/juci/source.cc @@ -380,7 +380,7 @@ void Source::ClangViewParse::update_diagnostics() { void Source::ClangViewParse::update_types() { type_tooltips.clear(); for(auto &token: *clang_tokens) { - if(token.has_type()) { + if(token.get_kind()==clang::Token_Identifier && token.has_type()) { auto start=get_buffer()->get_iter_at_offset(token.offsets.first); auto end=get_buffer()->get_iter_at_offset(token.offsets.second); auto get_tooltip_buffer=[this, &token]() { @@ -775,7 +775,7 @@ Source::ClangViewAutocomplete(file_path, project_path) { bool found=false; if(clang_readable) { 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(); if(insert_offset>=token.offsets.first && insert_offset<=token.offsets.second) { found=true;