- fix: Symbol completion of '(' before selection may fail, if cursor is at the beginning of the selection.
This commit is contained in:
parent
10c134a5c7
commit
ee26d9d0a0
2
NEWS.md
2
NEWS.md
|
@ -1,6 +1,6 @@
|
||||||
Red Panda C++ Version 2.25
|
Red Panda C++ Version 2.25
|
||||||
|
|
||||||
- change: Symbol completion of '(' won't test current character at the cursor.
|
- fix: Symbol completion of '(' before selection may fail, if cursor is at the beginning of the selection.
|
||||||
- change: Symbol completion of '{' won't insert extra new lines.
|
- change: Symbol completion of '{' won't insert extra new lines.
|
||||||
|
|
||||||
Red Panda C++ Version 2.24
|
Red Panda C++ Version 2.24
|
||||||
|
|
|
@ -1017,17 +1017,20 @@ void Editor::keyPressEvent(QKeyEvent *event)
|
||||||
case '*':
|
case '*':
|
||||||
case ';':
|
case ';':
|
||||||
case ',':
|
case ',':
|
||||||
case '(':
|
|
||||||
handled = handleSymbolCompletion(ch);
|
handled = handleSymbolCompletion(ch);
|
||||||
return;
|
return;
|
||||||
// QChar nextCh;
|
case '(': {
|
||||||
// if (selAvail()) {
|
if (!selAvail()) {
|
||||||
// nextCh = nextNonSpaceChar(caretY()-1,caretX()-1);
|
QChar nextCh = nextNonSpaceChar(caretY()-1,caretX()-1);
|
||||||
// } else {
|
if (!isIdentChar(nextCh) && nextCh!='('
|
||||||
// nextCh = nextNonSpaceChar(caretY()-1,caretX()-1);
|
&& nextCh!='"' && nextCh!='\'' ){
|
||||||
// }
|
handled = handleSymbolCompletion(ch);
|
||||||
// if (!isIdentChar(nextCh) && nextCh!='('
|
}
|
||||||
// && nextCh!='"' && nextCh!='\'' ){
|
} else {
|
||||||
|
handled = handleSymbolCompletion(ch);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
case '<':
|
case '<':
|
||||||
case '>':
|
case '>':
|
||||||
if (mParser) {
|
if (mParser) {
|
||||||
|
|
Loading…
Reference in New Issue