Skip to content

Commit

Permalink
themes: Updated the custom themes to the new text editor color palett…
Browse files Browse the repository at this point in the history
…es (#255)

* Updated the custom themes to the new text editor color palettes designed for full syntax highlighting, but the existing themes should look just like they did before.

* impr: renamed pattern-placed-variable to calculated-pointer and added view
fix: pe pattern could read past the end of file if symbol search option was turned on and input file had no symbols. In that case a StringTable array that has 1 element would be created and place at offset 0 where the size variable was set to a large number creating the error. The fix is to set the size of the array using numberOfSymbols>0

* Fix: that was a bad choice for the size of the stringTable array because  even if findSymbols is not on the file can contain symbols. This was causing the pe unit test to fail. To get the right array size use sizeof(symbolTable)>0 which will be 1 only if findSymbols is true and the file actually contains symbols
  • Loading branch information
paxcut authored Nov 17, 2024
1 parent 8a6bb66 commit 6697fc2
Show file tree
Hide file tree
Showing 7 changed files with 175 additions and 36 deletions.
2 changes: 1 addition & 1 deletion patterns/pe.hexpat
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,7 @@ struct StringTable {
SymbolString strings[while($ < addressof(this) + size)];
} [[inline]];

StringTable stringTable[checkForSymbols] @ addressof(symbolTable) + sizeof(symbolTable);
StringTable stringTable[sizeof(symbolTable)>0] @ addressof(symbolTable) + sizeof(symbolTable);

// Rich Header
bool checkForRichHeader in;
Expand Down
35 changes: 29 additions & 6 deletions themes/catppuccin-frappe.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,25 +126,48 @@
"title-text": "#C6D0F5FF"
},
"text-editor": {
"preprocessor-deactivated": "#4F4F4F45",
"background": "#303446FF",
"breakpoint": "#E78284FF",
"char-literal": "#A6D189FF",
"comment": "#737994FF",
"doc-block-comment": "#737994FF",
"doc-comment": "#737994FF",
"doc-global-comment": "#737994FF",
"current-line-edge": "#838BA77F",
"current-line-fill": "#838BA77F",
"current-line-fill-inactive": "#7379947F",
"cursor": "#F2D5CFFF",
"default": "#838BA7FF",
"default-text": "#838BA7FF",
"error-marker": "#E782847F",
"identifier": "#949CBBFF",
"unknown-identifier": "#E782847F",
"error-text": "#E782847F",
"debug-text": "#E782847F",
"warning-text": "#E782847F",
"pattern-variable": "#949CBBFF",
"function-parameter": "#949CBBFF",
"function-variable": "#949CBBFF",
"view": "#949CBBFF",
"global-variable": "#949CBBFF",
"local-variable": "#949CBBFF",
"calculated-pointer": "#949CBBFF",
"placed-variable": "#949CBBFF",
"template-variable": "#949CBBFF",
"attribute": "#949CBBFF",
"function": "#949CBBFF",
"namespace": "#949CBBFF",
"typedef": "#949CBBFF",
"user-defined-type": "#949CBBFF",
"keyword": "#CA9EE6FF",
"known-identifier": "#E78284FF",
"builtin-type": "#E78284FF",
"line-number": "#838BA7FF",
"multi-line-comment": "#737994FF",
"block-comment": "#737994FF",
"number": "#EF9F76FF",
"preproc-identifier": "#BABBF1FF",
"preprocessor": "#A5ADCEFF",
"punctuation": "#C6D0F5FF",
"preprocessor-identifier": "#BABBF1FF",
"directive": "#A5ADCEFF",
"operator": "#C6D0F5FF",
"separator": "#C6D0F5FF",
"selection": "#6268807F",
"string": "#A6D189FF"
}
Expand Down
35 changes: 29 additions & 6 deletions themes/catppuccin-latte.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,25 +126,48 @@
"title-text": "#4C4F69FF"
},
"text-editor": {
"preprocessor-deactivated": "#4F4F4F45",
"background": "#EFF1F5FF",
"breakpoint": "#D20F39FF",
"char-literal": "#40A02BFF",
"comment": "#9CA0B0FF",
"doc-block-comment": "#9CA0B0FF",
"doc-comment": "#9CA0B0FF",
"doc-global-comment": "#9CA0B0FF",
"current-line-edge": "#8C8FA17F",
"current-line-fill": "#8C8FA17F",
"current-line-fill-inactive": "#9CA0B07F",
"cursor": "#DC8A78FF",
"default": "#8C8FA1FF",
"default-text": "#8C8FA1FF",
"error-marker": "#D20F397F",
"identifier": "#7C7F93FF",
"unknown-identifier": "#D20F397F",
"error-text": "#D20F397F",
"debug-text": "#D20F397F",
"warning-text": "#D20F397F",
"pattern-variable": "#7C7F93FF",
"function-parameter": "#7C7F93FF",
"function-variable": "#7C7F93FF",
"view": "#7C7F93FF",
"global-variable": "#7C7F93FF",
"local-variable": "#7C7F93FF",
"calculated-pointer": "#7C7F93FF",
"placed-variable": "#7C7F93FF",
"template-variable": "#7C7F93FF",
"attribute": "#7C7F93FF",
"function": "#7C7F93FF",
"namespace": "#7C7F93FF",
"typedef": "#7C7F93FF",
"user-defined-type": "#7C7F93FF",
"keyword": "#8839EFFF",
"known-identifier": "#D20F39FF",
"builtin-type": "#D20F39FF",
"line-number": "#8C8FA1FF",
"multi-line-comment": "#9CA0B0FF",
"block-comment": "#9CA0B0FF",
"number": "#FE640BFF",
"preproc-identifier": "#7287FDFF",
"preprocessor": "#6C6F85FF",
"punctuation": "#4C4F69FF",
"preprocessor-identifier": "#7287FDFF",
"directive": "#6C6F85FF",
"operator": "#4C4F69FF",
"separator": "#4C4F69FF",
"selection": "#ACB0BE7F",
"string": "#40A02BFF"
}
Expand Down
35 changes: 29 additions & 6 deletions themes/catppuccin-macchiato.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,25 +126,48 @@
"title-text": "#CAD3F5FF"
},
"text-editor": {
"preprocessor-deactivated": "#4F4F4F45",
"background": "#24273AFF",
"breakpoint": "#ED8796FF",
"char-literal": "#A6DA95FF",
"comment": "#6E738DFF",
"doc-block-comment": "#6E738DFF",
"doc-comment": "#6E738DFF",
"doc-global-comment": "#6E738DFF",
"current-line-edge": "#8087A27F",
"current-line-fill": "#8087A27F",
"current-line-fill-inactive": "#6E738D7F",
"cursor": "#F4DBD6FF",
"default": "#8087A2FF",
"default-text": "#8087A2FF",
"error-marker": "#ED87967F",
"identifier": "#939AB7FF",
"unknown-identifier": "#ED87967F",
"error-text": "#ED87967F",
"debug-text": "#ED87967F",
"warning-text": "#ED87967F",
"pattern-variable": "#939AB7FF",
"function-parameter": "#939AB7FF",
"function-variable": "#939AB7FF",
"view": "#939AB7FF",
"global-variable": "#939AB7FF",
"local-variable": "#939AB7FF",
"calculated-pointer": "#939AB7FF",
"placed-variable": "#939AB7FF",
"template-variable": "#939AB7FF",
"attribute": "#939AB7FF",
"function": "#939AB7FF",
"namespace": "#939AB7FF",
"typedef": "#939AB7FF",
"user-defined-type": "#939AB7FF",
"keyword": "#C6A0F6FF",
"known-identifier": "#ED8796FF",
"builtin-type": "#ED8796FF",
"line-number": "#8087A2FF",
"multi-line-comment": "#6E738DFF",
"block-comment": "#6E738DFF",
"number": "#F5A97FFF",
"preproc-identifier": "#B7BDF8FF",
"preprocessor": "#A5ADCBFF",
"punctuation": "#CAD3F5FF",
"preprocessor-identifier": "#B7BDF8FF",
"directive": "#A5ADCBFF",
"operator": "#CAD3F5FF",
"separator": "#CAD3F5FF",
"selection": "#5B60787F",
"string": "#A6DA95FF"
}
Expand Down
35 changes: 29 additions & 6 deletions themes/catppuccin-mocha.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,25 +126,48 @@
"title-text": "#CDD6F4FF"
},
"text-editor": {
"preprocessor-deactivated": "#4F4F4F45",
"background": "#1E1E2EFF",
"breakpoint": "#F38BA8FF",
"char-literal": "#A6E3A1FF",
"comment": "#6C7086FF",
"doc-block-comment": "#6C7086FF",
"doc-comment": "#6C7086FF",
"doc-global-comment": "#6C7086FF",
"current-line-edge": "#7F849C7F",
"current-line-fill": "#7F849C7F",
"current-line-fill-inactive": "#6C70867F",
"cursor": "#F5E0DCFF",
"default": "#7F849CFF",
"default-text": "#7F849CFF",
"error-marker": "#F38BA87F",
"identifier": "#9399B2FF",
"unknown-identifier": "#F38BA87F",
"error-text": "#F38BA87F",
"debug-text": "#F38BA87F",
"warning-text": "#F38BA87F",
"pattern-variable": "#9399B2FF",
"function-parameter": "#9399B2FF",
"function-variable": "#9399B2FF",
"view": "#9399B2FF",
"global-variable": "#9399B2FF",
"local-variable": "#9399B2FF",
"calculated-pointer": "#9399B2FF",
"placed-variable": "#9399B2FF",
"template-variable": "#9399B2FF",
"attribute": "#9399B2FF",
"function": "#9399B2FF",
"namespace": "#9399B2FF",
"typedef": "#9399B2FF",
"user-defined-type": "#9399B2FF",
"keyword": "#CBA6F7FF",
"known-identifier": "#F38BA8FF",
"builtin-type": "#F38BA8FF",
"line-number": "#7F849CFF",
"multi-line-comment": "#6C7086FF",
"block-comment": "#6C7086FF",
"number": "#FAB387FF",
"preproc-identifier": "#B4BEFEFF",
"preprocessor": "#A6ADC8FF",
"punctuation": "#CDD6F4FF",
"preprocessor-identifier": "#B4BEFEFF",
"directive": "#A6ADC8FF",
"operator": "#CDD6F4FF",
"separator": "#CDD6F4FF",
"selection": "#585B707F",
"string": "#A6E3A1FF"
}
Expand Down
34 changes: 29 additions & 5 deletions themes/solarized_dark.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,25 +126,49 @@
"title-text": "#FFFFFFFF"
},
"text-editor": {
"preprocessor-deactivated": "#4F4F4F45",
"background": "#0B2A36FF",
"breakpoint": "#0080F040",
"char-literal": "#E0A070FF",
"comment": "#206020FF",
"doc-block-comment": "#206020FF",
"doc-comment": "#206020FF",
"doc-global-comment": "#206020FF",
"current-line-edge": "#A0A0A040",
"current-line-fill": "#21506172",
"current-line-fill-inactive": "#21506172",
"cursor": "#E0E0E0FF",
"default": "#7F7F7FFF",
"default-text": "#7F7F7FFF",
"error-marker": "#FF200080",
"unknown-identifier": "#FF200080",
"error-text": "#FF200080",
"debug-text": "#FF200080",
"warning-text": "#FF200080",
"identifier": "#AAAAAAFF",
"pattern-variable": "#AAAAAAFF",
"function-parameter": "#AAAAAAFF",
"function-variable": "#AAAAAAFF",
"view": "#AAAAAAFF",
"global-variable": "#AAAAAAFF",
"local-variable": "#AAAAAAFF",
"calculated-pointer": "#AAAAAAFF",
"placed-variable": "#AAAAAAFF",
"template-variable": "#AAAAAAFF",
"attribute": "#AAAAAAFF",
"function": "#AAAAAAFF",
"namespace": "#AAAAAAFF",
"typedef": "#AAAAAAFF",
"user-defined-type": "#AAAAAAFF",
"keyword": "#569CD6FF",
"known-identifier": "#4DC69BFF",
"builtin-type": "#4DC69BFF",
"line-number": "#007070FF",
"multi-line-comment": "#206040FF",
"block-comment": "#206040FF",
"number": "#00FF00FF",
"preproc-identifier": "#A040C0FF",
"preprocessor": "#808040FF",
"punctuation": "#FFFFFFFF",
"preprocessor-identifier": "#A040C0FF",
"directive": "#808040FF",
"operator": "#FFFFFFFF",
"separator": "#FFFFFFFF",
"selection": "#2060A080",
"string": "#E07070FF"
}
Expand Down
35 changes: 29 additions & 6 deletions themes/vs_dark.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,25 +128,48 @@
"title-text": "#FFFFFFFF"
},
"text-editor": {
"preprocessor-deactivated": "#4F4F4F45",
"background": "#1F1F1FFF",
"breakpoint": "#0080F040",
"char-literal": "#E0A070FF",
"comment": "#206020FF",
"doc-block-comment": "#206020FF",
"doc-comment": "#206020FF",
"doc-global-comment": "#206020FF",
"current-line-edge": "#A0A0A040",
"current-line-fill": "#00000040",
"current-line-fill-inactive": "#80808040",
"cursor": "#E0E0E0FF",
"default": "#7F7F7FFF",
"default-text": "#7F7F7FFF",
"error-marker": "#FF200080",
"identifier": "#AAAAAAFF",
"unknown-identifier": "#FF200080",
"error-text": "#FF200080",
"debug-text": "#FF200080",
"warning-text": "#FF200080",
"pattern-variable": "#AAAAAAFF",
"function-parameter": "#AAAAAAFF",
"function-variable": "#AAAAAAFF",
"view": "#AAAAAAFF",
"global-variable": "#AAAAAAFF",
"local-variable": "#AAAAAAFF",
"calculated-pointer": "#AAAAAAFF",
"placed-variable": "#AAAAAAFF",
"template-variable": "#AAAAAAFF",
"attribute": "#AAAAAAFF",
"function": "#AAAAAAFF",
"namespace": "#AAAAAAFF",
"typedef": "#AAAAAAFF",
"user-defined-type": "#AAAAAAFF",
"keyword": "#569CD6FF",
"known-identifier": "#4DC69BFF",
"builtin-type": "#4DC69BFF",
"line-number": "#007070FF",
"multi-line-comment": "#206040FF",
"block-comment": "#206040FF",
"number": "#00FF00FF",
"preproc-identifier": "#A040C0FF",
"preprocessor": "#808040FF",
"punctuation": "#FFFFFFFF",
"preprocessor-identifier": "#A040C0FF",
"directive": "#808040FF",
"operator": "#FFFFFFFF",
"separator": "#FFFFFFFF",
"selection": "#2060A080",
"string": "#E07070FF"
}
Expand Down

0 comments on commit 6697fc2

Please sign in to comment.