-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Close CSS Code Hints after inputting property value #10524
Conversation
if (lastContext === CSSUtils.PROP_VALUE) { | ||
// close the session if we're coming from a property value | ||
// see https://github.com/adobe/brackets/issues/9496 | ||
return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marcelgerber Just a small thing. To adhere to how it is done everywhere can you change this to return null
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed (& rebased)
@marcelgerber I took this change and it does not seem to solve #9496. I am not sure if this makes the issue better though. |
9a524b1
to
5f9b347
Compare
Hm, it definitely works for me. So, just to be sure, these are the steps I followed:
Before: |
Hi, I opened issue #9496 and was wondering whether this fix is available yet? the problem still seems to exist in Brackets 1.3 downloaded today. Cheers |
@kylelondonuk This is not merged yet. |
FWIW I can confirm the STR above and this PR fixes it. |
I do think this fix should be reviewed soon. Would you mind? Maybe @abose? |
There is a test failing under By the way I'd write the code like the following: I find it easier to read. - lastContext = CSSUtils.PROP_NAME;
+ if (lastContext === CSSUtils.PROP_VALUE) {
+ // Close the session if we're coming from a property value.
+ // See https://github.com/adobe/brackets/issues/9496
+ return null;
+ }
+
+ lastContext = CSSUtils.PROP_NAME;
needle = needle.substr(0, this.info.offset); |
@ficristo With latest master merged in, all tests pass for me. |
You are missing a brace. |
265249c
to
7f740f6
Compare
Argh, yesterday simply wasn't my day. Fixed it now and squashed the commits as. |
Thank you, LGTM. |
For #9496 and #4888