- change: symbols that exactly match are sorted to the front in the code suggestion popup list
This commit is contained in:
parent
532ba4917e
commit
5b699f2b46
1
NEWS.md
1
NEWS.md
|
@ -3,6 +3,7 @@ Red Panda C++ Version 0.13.3
|
||||||
- enhancement: restore editor position after reformat code
|
- enhancement: restore editor position after reformat code
|
||||||
- fix: If project's compiler set is not the same with the default compiler set, parser for the project doesn't use the project's compiler set
|
- fix: If project's compiler set is not the same with the default compiler set, parser for the project doesn't use the project's compiler set
|
||||||
- fix: If project's compiler set is not the same with the default compiler set, auto openned project's file will use wrong compiler set to do syntax check.
|
- fix: If project's compiler set is not the same with the default compiler set, auto openned project's file will use wrong compiler set to do syntax check.
|
||||||
|
- change: symbols that exactly match are sorted to the front in the code suggestion popup list
|
||||||
|
|
||||||
Red Panda C++ Version 0.13.2
|
Red Panda C++ Version 0.13.2
|
||||||
- fix: "delete and exit" button in the environtment / folder option page doesn't work correctly
|
- fix: "delete and exit" button in the environtment / folder option page doesn't work correctly
|
||||||
|
|
|
@ -211,15 +211,15 @@ void CodeCompletionPopup::addStatement(PStatement statement, const QString &file
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool nameComparator(PStatement statement1,PStatement statement2) {
|
static bool nameComparator(PStatement statement1,PStatement statement2) {
|
||||||
|
return statement1->command < statement2->command;
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool defaultComparator(PStatement statement1,PStatement statement2) {
|
||||||
if (statement1->caseMatch && !statement2->caseMatch) {
|
if (statement1->caseMatch && !statement2->caseMatch) {
|
||||||
return true;
|
return true;
|
||||||
} else if (!statement1->caseMatch && statement2->caseMatch) {
|
} else if (!statement1->caseMatch && statement2->caseMatch) {
|
||||||
return false;
|
return false;
|
||||||
} else
|
}
|
||||||
return statement1->command < statement2->command;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool defaultComparator(PStatement statement1,PStatement statement2) {
|
|
||||||
// Show user template first
|
// Show user template first
|
||||||
if (statement1->kind == StatementKind::skUserCodeSnippet) {
|
if (statement1->kind == StatementKind::skUserCodeSnippet) {
|
||||||
if (statement2->kind != StatementKind::skUserCodeSnippet)
|
if (statement2->kind != StatementKind::skUserCodeSnippet)
|
||||||
|
@ -240,6 +240,11 @@ static bool defaultComparator(PStatement statement1,PStatement statement2) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool sortByScopeComparator(PStatement statement1,PStatement statement2){
|
static bool sortByScopeComparator(PStatement statement1,PStatement statement2){
|
||||||
|
if (statement1->caseMatch && !statement2->caseMatch) {
|
||||||
|
return true;
|
||||||
|
} else if (!statement1->caseMatch && statement2->caseMatch) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
// Show user template first
|
// Show user template first
|
||||||
if (statement1->kind == StatementKind::skUserCodeSnippet) {
|
if (statement1->kind == StatementKind::skUserCodeSnippet) {
|
||||||
if (statement2->kind != StatementKind::skUserCodeSnippet)
|
if (statement2->kind != StatementKind::skUserCodeSnippet)
|
||||||
|
@ -273,6 +278,11 @@ static bool sortByScopeComparator(PStatement statement1,PStatement statement2){
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool sortWithUsageComparator(PStatement statement1,PStatement statement2) {
|
static bool sortWithUsageComparator(PStatement statement1,PStatement statement2) {
|
||||||
|
if (statement1->caseMatch && !statement2->caseMatch) {
|
||||||
|
return true;
|
||||||
|
} else if (!statement1->caseMatch && statement2->caseMatch) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
// Show user template first
|
// Show user template first
|
||||||
if (statement1->kind == StatementKind::skUserCodeSnippet) {
|
if (statement1->kind == StatementKind::skUserCodeSnippet) {
|
||||||
if (statement2->kind != StatementKind::skUserCodeSnippet)
|
if (statement2->kind != StatementKind::skUserCodeSnippet)
|
||||||
|
@ -298,6 +308,11 @@ static bool sortWithUsageComparator(PStatement statement1,PStatement statement2)
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool sortByScopeWithUsageComparator(PStatement statement1,PStatement statement2){
|
static bool sortByScopeWithUsageComparator(PStatement statement1,PStatement statement2){
|
||||||
|
if (statement1->caseMatch && !statement2->caseMatch) {
|
||||||
|
return true;
|
||||||
|
} else if (!statement1->caseMatch && statement2->caseMatch) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
// Show user template first
|
// Show user template first
|
||||||
if (statement1->kind == StatementKind::skUserCodeSnippet) {
|
if (statement1->kind == StatementKind::skUserCodeSnippet) {
|
||||||
if (statement2->kind != StatementKind::skUserCodeSnippet)
|
if (statement2->kind != StatementKind::skUserCodeSnippet)
|
||||||
|
|
Loading…
Reference in New Issue