ide: Fixed cosmetics Assist issue with decltype

This commit is contained in:
Mirek Fidler 2026-04-17 11:42:53 +02:00
parent 1babe51b5e
commit 803ee2a056

View file

@ -87,10 +87,12 @@ int PaintCpp(Draw& w, const Rect& r, int kind, const String& name, const String&
#endif
Vector<ItemTextPart> n = ParsePretty(name, pretty);
bool hasdecltype = pretty.StartsWith("decltype");
int count = n.GetCount();
if(retval_last) {
for(int i = 0; i < n.GetCount(); i++)
if(findarg(n[i].type, ITEM_NAME, ITEM_OPERATOR) >= 0 || pretty[n[i].pos] == '(') {
if(findarg(n[i].type, ITEM_NAME, ITEM_OPERATOR) >= 0 ||
pretty[n[i].pos] == '(' && !hasdecltype) {
PaintText(w, x, y, pretty, n, i, count - i, focuscursor, ink, false);
count = i;
while(count) { // remove trailing spaces