From c17678b5daa3aa5fa62b5bb762e34f2a7a62e4ee Mon Sep 17 00:00:00 2001 From: cxl Date: Thu, 18 Sep 2008 19:41:09 +0000 Subject: [PATCH] More Assist++ fixes - Alt+J, Alt+I git-svn-id: svn://ultimatepp.org/upp/trunk@456 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/ide/Assist.cpp | 5 +++-- uppsrc/ide/Goto.cpp | 7 ++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/uppsrc/ide/Assist.cpp b/uppsrc/ide/Assist.cpp index a35c80f8e..0d956a97a 100644 --- a/uppsrc/ide/Assist.cpp +++ b/uppsrc/ide/Assist.cpp @@ -959,12 +959,13 @@ void Ide::JumpS() if(q < 0) return; +/* if(nest.GetCount() > 1 || n.name.FindNext(q) >= 0) { browser.SetId(id, nest); SetBottom(BBROWSER); SetBar(); } - +*/ const CppItem& m = n[q]; if(m.pos.GetCount() == 0) return; @@ -976,7 +977,7 @@ void Ide::JumpS() return; } String ext = ToLower(GetFileExt(fp.GetFile())); - if(ext == ".CPP" || ext == ".C" || ext == ".CC") + if(ext == ".cpp" || ext == ".c" || ext == ".cc") ai = i; } GotoCpp(m.pos[ai]); diff --git a/uppsrc/ide/Goto.cpp b/uppsrc/ide/Goto.cpp index 4c5fcba3d..922c26142 100644 --- a/uppsrc/ide/Goto.cpp +++ b/uppsrc/ide/Goto.cpp @@ -1,5 +1,7 @@ #include "ide.h" +#define LLOG(x) DLOG(x) + struct GotoDlg : public WithGotoLayout { bool global; Array item; @@ -234,19 +236,22 @@ void Ide::SwapS() Parser p; editor.SwapSContext(p); int q = BrowserBase().Find(p.current_nest); + LLOG("SwapS nest: " << p.current_nest); if(q < 0) return; const CppNest& n = BrowserBase()[q]; q = n.key.Find(QualifyKey(BrowserBase(), p.current_nest, p.current_key)); if(q < 0) return; - int line = -1; + int line = -1; if(p.current.pos.GetCount()) line = p.current.pos.Top().line; + LLOG("SwapS line: " << line); const CppItem& m = n[q]; int i; for(i = 0; i < m.pos.GetCount(); i++) { const CppPos& fp = m.pos[i]; + LLOG("file: " << fp.GetFile() << ", line: " << fp.line); if(fp.GetFile() == editfile && fp.line == line) { i++; break;