mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-13 06:12:49 -06:00
More Assist++ fixes - Alt+J, Alt+I
git-svn-id: svn://ultimatepp.org/upp/trunk@456 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
fe935c717e
commit
c17678b5da
2 changed files with 9 additions and 3 deletions
|
|
@ -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]);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include "ide.h"
|
||||
|
||||
#define LLOG(x) DLOG(x)
|
||||
|
||||
struct GotoDlg : public WithGotoLayout<TopWindow> {
|
||||
bool global;
|
||||
Array<CppItemInfo> 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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue