ipatalas / vscode-postfix-ts

Postfix notation for TypeScript/Javascript - extension for VS Code
MIT License
159 stars 43 forks source link

Binary expression parentheses quickpick regression #80

Closed zardoy closed 2 years ago

zardoy commented 2 years ago

Not suggesting multiple variants in these cases anymore: if (a > b && (x * 100){not}) or if (b && (a > 50){not} && a) But we have the following test: if (a > b && x * 100{not}) (without parentheses)

ipatalas commented 2 years ago

Found the bug. I will add another test for that to make sure it won't happen again ;) ...and I thought I've got pretty good test coverage here but yet you manage to find something new :D Well done 🏅

zardoy commented 2 years ago

Hey! @ipatalas something weird started to happen in this case:

if (
        (a && (b &&
        a
        .a
        .b)).if
    )  {}

It was suggesting only .not template in this case, but now it also suggest .if with incorrect insertText

ipatalas commented 2 years ago

Are you sure it's not a custom template? It works fine on my end: image .not is the only default template being suggested.