Browse Source

Slight improvement to C/C++ include completion

merge-requests/399/head
eidheim 6 years ago
parent
commit
d9fe88d1a7
  1. 2
      src/source_clang.cc

2
src/source_clang.cc

@ -853,7 +853,7 @@ Source::ClangViewAutocomplete::ClangViewAutocomplete(const boost::filesystem::pa
}
}
// Do not insert last " or > inside #include statements
if(!row.empty() && ((row.back() == '"' && row.find('"') == row.size() - 1) || (row.back() == '>' && row.find('<') == std::string::npos)))
if(!row.empty() && ((*iter == '"' && row.back() == '"' && row.find('"') == row.size() - 1) || (*iter == '>' && row.back() == '>' && row.find('<') == std::string::npos)))
row.pop_back();
get_buffer()->insert(CompletionDialog::get()->start_mark->get_iter(), row);

Loading…
Cancel
Save