[Github-comments] [geany/geany] Update to Scintilla 5.1.3 and Lexilla 5.1.2 (#2930)

Enrico Tröger notifications at xxxxx
Sun Oct 24 10:58:25 UTC 2021


@eht16 commented on this pull request.



> @@ -388,7 +388,12 @@ static const HLStyle highlighting_styles_CSS[] =
 	{ SCE_CSS_EXTENDED_IDENTIFIER,		"extended_identifier",		FALSE },
 	{ SCE_CSS_EXTENDED_PSEUDOCLASS,		"extended_pseudoclass",		FALSE },
 	{ SCE_CSS_EXTENDED_PSEUDOELEMENT,	"extended_pseudoelement",	FALSE },
-	{ SCE_CSS_MEDIA,					"media",					FALSE }
+	{ SCE_CSS_GROUP_RULE,				"group_rule",				FALSE },
+	/* In Geany 1.38 and earlier shipped filetypes.css with "media" identifier,
+	 * Scintilla/Lexilla 5.1.2 has renamed this style and extended its meaning.
+	 * We still recognize media for compatibility.
+	 */
+	{ SCE_CSS_GROUP_RULE,				"media",					FALSE }

Good idea. Though it doesn't work, easy to find out by just testing it:
the "media" item overwrites the previous "group_rule" item, regardless whether "group_rule" appears in the fletype configuration or not.

So, we have a couple of options here:
1. keep the name "media" even though it doesn't matter the Scintilla style name anymore. Maybe add a comment in `data/filedefs/filetypes.css` to the "media" style to document it's also used for the other CSS groups
2. rename the style to "group_rule" and tell the users in the release notes about the renamed style, some users probably won't notice it anyway and might be wondering about broken styling
3. add some code which actually can handle such duplicate comparability style items
4. add some code to support something like
```
group_rule=0xffffff;0x0000ff;true;false
media=group_rule
```
in filetype definition files, currently style references seem to work only for global styles but not for those defined in the same file.

I think 4. would be the best and most flexible solution but also with the most effort. And of course, 3. and 4. would be totally out of scope of this PR.

So maybe 1. would be good enough? If such renamings happen more often in the future, we might reconsider the other options, I think.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/2930#discussion_r735100437
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20211024/b4db0ae3/attachment.htm>


More information about the Github-comments mailing list