ide: Autocomplete issue with ? : operator #1145

git-svn-id: svn://ultimatepp.org/upp/trunk@8596 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2015-06-24 18:53:24 +00:00
parent dd697f4f68
commit 9111958d81
2 changed files with 7 additions and 10 deletions

View file

@ -209,9 +209,8 @@ String AssistEditor::CompleteIdBack(int& q)
id = '<' + id;
}
else
if(Ch(q - 1) == ':') {
while(Ch(q - 1) == ':')
q--;
if(Ch(q - 1) == ':' && Ch(q - 2) == ':') {
q -= 2;
id = "::" + id;
}
else {
@ -253,10 +252,9 @@ Vector<String> AssistEditor::ReadBack(int q)
for(;;) {
id = IdBack(q) + id;
SkipSpcBack(q);
if(Ch(q - 1) != ':')
if(!(Ch(q - 1) == ':' && Ch(q - 2) == ':'))
break;
while(Ch(q - 1) == ':')
q--;
q -= 2;
id = "::" + id;
SkipSpcBack(q);
}
@ -453,9 +451,8 @@ void AssistEditor::Assist()
return;
}
}
if(Ch(q - 1) == ':') {
while(Ch(q - 1) == ':')
q--;
if(Ch(q - 1) == ':' && Ch(q - 2) == ':') {
q -= 2;
Vector<String> tparam;
String scope = ParseTemplatedType(Qualify(parser.current_scope, CompleteIdBack(q), parser.context.namespace_using), tparam);
GatherItems(scope, false, in_types, true);

View file

@ -1,6 +1,6 @@
#include "ide.h"
#if 1
#if 0
#define LDUMP(x) DDUMP(x)
#define LDUMPC(x) DDUMPC(x)
#define LLOG(x) DLOG(x)