From 74ea2a00b23ad04452ab000fe1839975294aaef2 Mon Sep 17 00:00:00 2001 From: cxl Date: Mon, 15 Jun 2015 18:43:04 +0000 Subject: [PATCH] ide: Navigator now shows implementation first git-svn-id: svn://ultimatepp.org/upp/trunk@8549 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/ide/Navigator.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/uppsrc/ide/Navigator.cpp b/uppsrc/ide/Navigator.cpp index 883014b0e..b9ecd48f7 100644 --- a/uppsrc/ide/Navigator.cpp +++ b/uppsrc/ide/Navigator.cpp @@ -197,10 +197,10 @@ void Navigator::GoToNavLine() bool Navigator::NavLine::operator<(const NavLine& b) const { - String p1 = GetSourceFilePath(file); + String p1 = GetSourceFilePath(file); // String p2 = GetSourceFilePath(b.file); - return CombineCompare(!impl, !b.impl) - (GetFileExt(p1), GetFileExt(p2)) // .h > .c + return CombineCompare/*(!impl, !b.impl)*/ + (GetFileExt(p2), GetFileExt(p1)) // .h > .c (GetFileName(p1), GetFileName(p2)) (p1, p2) (line, b.line) < 0; @@ -240,9 +240,9 @@ void Navigator::Navigate() else { Vector l = GetNavLines(m); int q = l.GetCount() - 1; - for(int i = q; i >= 0; i--) - if(GetSourceFilePath(l[i].file) == theide->editfile && l[i].line == ln) { - q = (i + l.GetCount() - 1) % l.GetCount(); + for(int i = 0; i < l.GetCount(); i++) + if(GetSourceFilePath(l[i].file) == NormalizeSourcePath(theide->editfile) && l[i].line == ln) { + q = (i + l.GetCount() + 1) % l.GetCount(); break; } if(q >= 0 && q < l.GetCount())