d4rkr00t / language-stylus

Stylus language support for Visual Studio Code
MIT License
44 stars 12 forks source link

fix(decoration): Decorations should be set unconditionally #61

Closed nekolab closed 6 years ago

nekolab commented 6 years ago

Currently, when there is the last decoration on screen and you remove the associated color, you will find the decoration still exist in document, but it should be removed.

This is because when decorations changed from an array with elements to an empty array, the setDecorations method will not be triggered, until it has elements again, and caused this issue.

I believe remove the if clause can fix this issue without any potential risk.

Please take a look, thanks

d4rkr00t commented 6 years ago

Nice catch! Thank you! I'm merging this and i'll release a patch version shortly :)

d4rkr00t commented 6 years ago

Released as 1.9.1 – https://github.com/d4rkr00t/language-stylus/releases/tag/v1.9.1