When adding highlight groups, you may need to add a "default link NewHlGroup ExistingHlGroup" in highlight.c code, so that when resetting a color scheme an old color will not be left behind.
Added a Makefile target in the 'runtime/doc' directory that checks if hl- groups that were added to the documentation are either reflected in the source code, or belong to a list of 'known to be ignored' highlight groups.
https://github.com/vim/vim/pull/16678
(2 files)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@cvwillegen pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@cvwillegen pushed 1 commit.
You are receiving this because you are subscribed to this thread.![]()
@cvwillegen pushed 2 commits.
You are receiving this because you are subscribed to this thread.![]()
@cvwillegen pushed 1 commit.
- 9f1450d Check if removing "default link" breaks the build.
@chrisbra commented on this pull request.
In ci/hlgroups.make:
> @@ -0,0 +1,18 @@ +# vim: ft=make +SHELL = /bin/bash + +# Default target to actually run the comparison: +.PHONY: check +.INTERMEDIATE: hlgroups deflinks hlgroups.stripped + +check: hlgroups.stripped deflinks + diff hlgroups.stripped deflinks + +hlgroups: + grep '\*hl-' ../runtime/doc/*txt | sed -E 's/.*:<?\s*//' | sed 's/ /\n/g' | sed 's/hl-//' | sed 's/\*//g' | sort > hlgroups
This seems a bit ugly. Perhaps use a separate sed script like this:
#!/bin/sh
sed -ne '/\*hl-/{
s/^<\?\s*//
s/\*//g
s/hl-//g
s/ /\n/
p
}' ../runtime/doc/*.txt |sort
or put all the sed invocations into a single command using several -e args.
In src/highlight.c:
> @@ -261,7 +261,6 @@ static char *(highlight_init_both[]) = {
"default link PmenuMatch Pmenu",
"default link PmenuMatchSel PmenuSel",
"default link PmenuExtra Pmenu",
- "default link PmenuExtraSel PmenuSel",
I don't understand that. Why do we need to remove the default link for PmenuExtraSel?
In ci/hlgroups.make:
> @@ -0,0 +1,18 @@ +# vim: ft=make +SHELL = /bin/bash + +# Default target to actually run the comparison: +.PHONY: check +.INTERMEDIATE: hlgroups deflinks hlgroups.stripped + +check: hlgroups.stripped deflinks + diff hlgroups.stripped deflinks + +hlgroups: + grep '\*hl-' ../runtime/doc/*txt | sed -E 's/.*:<?\s*//' | sed 's/ /\n/g' | sed 's/hl-//' | sed 's/\*//g' | sort > hlgroups
Do we need a clean rule?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
shouldn't we call this script in https://github.com/vim/vim/blob/master/.github/workflows/ci.yml like the vimtags target?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
chrisbra left a comment (vim/vim#16678)
shouldn't we call this script in https://github.com/vim/vim/blob/master/.github/workflows/ci.yml like the vimtags target?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Yes, I'm trying to get this in CI.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.![]()
Reopened #16678.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.![]()
@cvwillegen pushed 2 commits.
You are receiving this because you are subscribed to this thread.![]()
@cvwillegen pushed 1 commit.
You are receiving this because you are subscribed to this thread.![]()
@cvwillegen pushed 1 commit.
You are receiving this because you are subscribed to this thread.![]()
@cvwillegen pushed 1 commit.
You are receiving this because you are subscribed to this thread.![]()
@cvwillegen pushed 1 commit.
You are receiving this because you are subscribed to this thread.![]()
@cvwillegen commented on this pull request.
In ci/hlgroups.make:
> @@ -0,0 +1,18 @@ +# vim: ft=make +SHELL = /bin/bash + +# Default target to actually run the comparison: +.PHONY: check +.INTERMEDIATE: hlgroups deflinks hlgroups.stripped + +check: hlgroups.stripped deflinks + diff hlgroups.stripped deflinks + +hlgroups: + grep '\*hl-' ../runtime/doc/*txt | sed -E 's/.*:<?\s*//' | sed 's/ /\n/g' | sed 's/hl-//' | sed 's/\*//g' | sort > hlgroups
or put all the sed invocations into a single command using several
-eargs.
I ended up doing exactly that, thanks for the hint!
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.![]()
@cvwillegen commented on this pull request.
In ci/hlgroups.make:
> @@ -0,0 +1,18 @@ +# vim: ft=make +SHELL = /bin/bash + +# Default target to actually run the comparison: +.PHONY: check +.INTERMEDIATE: hlgroups deflinks hlgroups.stripped + +check: hlgroups.stripped deflinks + diff hlgroups.stripped deflinks + +hlgroups: + grep '\*hl-' ../runtime/doc/*txt | sed -E 's/.*:<?\s*//' | sed 's/ /\n/g' | sed 's/hl-//' | sed 's/\*//g' | sort > hlgroups
Do we need a clean rule?
I added the intermediate files in the .INTERMEDIATE Makefile target, so a clean rule is not needed any more.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.![]()
I think this is done now.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.![]()
thanks
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.![]()