Fixed multiple J problems

This commit is contained in:
Mirek Fidler 2022-09-07 00:20:13 +02:00
parent e1bf8b3615
commit 8f960dacbf
4 changed files with 26 additions and 12 deletions

View file

@ -131,8 +131,10 @@ void Ide::ContextGoto0(int pos)
String ref_id;
int ci = 0;
String name = editor.ReadIdBack(pos);
DDUMP(name);
for(int pass = 0; pass < 2 && IsNull(ref_id); pass++)
for(const ReferenceItem& m : editor.references) {
DDUMP(m.id);
if(m.pos.y == li && m.pos.x <= lp && m.pos.x >= ci &&
(GetNameFromId(m.id) == name || pass == 1)) {
ref_id = m.id;

View file

@ -345,7 +345,7 @@ bool ClangVisitor::ProcessNode(CXCursor cursor)
CXCursor_Destructor, CXCursor_CXXMethod, CXCursor_ConversionFunction) >= 0)
locals = true;
return findarg(kind, CXCursor_FieldDecl, CXCursor_VarDecl) < 0;
return true;
}
CXChildVisitResult clang_visitor(CXCursor cursor, CXCursor p, CXClientData clientData) {
@ -396,10 +396,20 @@ void ClangVisitor::Do(CXTranslationUnit tu)
initialized = true;
clang_visitChildren(cursor, clang_visitor, this);
for(CppFileInfo& f : info) // sort by line because macros are first TODO move it after macros are by HDepend
for(CppFileInfo& f : info) { // sort by line because macros are first TODO move it after macros are by HDepend
Sort(f.items, [](const AnnotationItem& a, const AnnotationItem& b) {
return CombineCompare(a.pos.y, b.pos.y)(a.pos.x, b.pos.x) < 0;
});
// remove duplicates
Vector<int> toremove;
for(int i = 1; i < f.items.GetCount(); i++) {
AnnotationItem& a = f.items[i - 1];
AnnotationItem& b = f.items[i];
if(a.pos == b.pos && a.id == b.id)
toremove.Add(i);
}
f.items.Remove(toremove);
}
}
ClangVisitor::~ClangVisitor()

View file

@ -1,5 +1,13 @@
DONE:
- OpenWind/PowerCurve.cpp:3883 J on GetElevation
- Vector/VectorLayer.cpp:870 J on GetBuffer
- Raster/RasterLayer.cpp:841 J on NewRc
- Occasional freeze probably due to reindexing
- Heap leaks in Linux
- Alt-I on AssistDisplay::Paint

View file

@ -1,11 +1,11 @@
CRITICAL:
ISUES:
- out of sync SetCurrentFile
- NewFile gets called on .log update resulting in SetCurrentFile and SyncHeaders (maybe not?)
ISUES:
- MSVC
- optimise loading
@ -96,18 +96,12 @@ ISUES:
- Icons Alt-J/I/U
- Occasional freeze probably due to reindexing
- void ClearTurbineVarsCache() - after switching main config, reparse file
- Raster/RasterLayer.cpp:841 J on NewRc
- Vector/VectorLayer.cpp:870 J on GetBuffer
- OpenWind/PowerCurve.cpp:3883 J on GetElevation
- (unnamed) BAD -> LogicalReport - fix enum in autocomplete
- navigator "BAD" - should be first
NONCLANG:
- Debugger Threads should show active threads first