mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
CtrlCore: Fixed workares issue in X11/GTK, various cosmetics
git-svn-id: svn://ultimatepp.org/upp/trunk@7336 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
f59fe47620
commit
e2b5d44cc8
32 changed files with 87 additions and 56 deletions
|
|
@ -991,7 +991,7 @@ WString ASBeautifier::beautify(const WString &originalLine)
|
|||
}
|
||||
|
||||
// handle quotes (such as 'x' and "Hello Dolly")
|
||||
if (!(isInComment || isInLineComment) && (ch == '"' || ch == '\''))
|
||||
if (!(isInComment || isInLineComment) && (ch == '"' || ch == '\'')) {
|
||||
if (!isInQuote)
|
||||
{
|
||||
quoteChar = ch;
|
||||
|
|
@ -1003,6 +1003,7 @@ WString ASBeautifier::beautify(const WString &originalLine)
|
|||
isInStatement = true;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (isInQuote)
|
||||
continue;
|
||||
|
||||
|
|
@ -1621,11 +1622,12 @@ WString ASBeautifier::beautify(const WString &originalLine)
|
|||
// that both an assignment op and a non-assignment op where found,
|
||||
// e.g. '>>' and '>>='. If this is the case, treat the LONGER one as the
|
||||
// found operator.
|
||||
if (foundAssignmentOp != NULL && foundNonAssignmentOp != NULL)
|
||||
if (foundAssignmentOp != NULL && foundNonAssignmentOp != NULL) {
|
||||
if (foundAssignmentOp->GetCount() < foundNonAssignmentOp->GetCount())
|
||||
foundAssignmentOp = NULL;
|
||||
else
|
||||
foundNonAssignmentOp = NULL;
|
||||
}
|
||||
|
||||
if (foundNonAssignmentOp != NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ void ASEnhancer::enhance(WString &line)
|
|||
}
|
||||
|
||||
// handle quotes (such as 'x' and "Hello Dolly")
|
||||
if (!(isInComment) && (ch == '"' || ch == '\''))
|
||||
if (!(isInComment) && (ch == '"' || ch == '\'')) {
|
||||
if (!isInQuote)
|
||||
{
|
||||
quoteChar = ch;
|
||||
|
|
@ -228,6 +228,7 @@ void ASEnhancer::enhance(WString &line)
|
|||
isInQuote = false;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (isInQuote)
|
||||
continue;
|
||||
|
|
@ -335,11 +336,12 @@ void ASEnhancer::enhance(WString &line)
|
|||
}
|
||||
for (; i < lineLength; i++) // bypass colon
|
||||
{
|
||||
if (line[i] == ':')
|
||||
if (line[i] == ':') {
|
||||
if ((i + 1 < lineLength) && (line[i + 1] == ':'))
|
||||
i++; // bypass scope resolution operator
|
||||
else
|
||||
break;
|
||||
}
|
||||
}
|
||||
i++;
|
||||
for (; i < lineLength; i++) // bypass whitespace
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue