Skip to content

Commit

Permalink
Merge pull request #1868 from zed-industries/readd-search-match-highl…
Browse files Browse the repository at this point in the history
…ight

Update search match highlight and occurrence style
  • Loading branch information
iamnbutler authored and maxbrunsfeld committed Nov 10, 2022
1 parent 1375c6b commit d66e490
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions styles/src/styleTree/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ export default function editor(colorScheme: ColorScheme) {
widthEm: 0.16,
cornerRadius: 0.05,
},
documentHighlightReadBackground: colorScheme.ramps
.neutral(0.5)
.alpha(0.2)
.hex(), // TODO: This was blend
/** Highlights matching occurences of what is under the cursor
* as well as matched brackets
*/
documentHighlightReadBackground: withOpacity(foreground(layer, "accent"), 0.1),
documentHighlightWriteBackground: colorScheme.ramps
.neutral(0.5)
.alpha(0.4)
Expand Down
6 changes: 4 additions & 2 deletions styles/src/styleTree/search.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ColorScheme } from "../themes/common/colorScheme";
import { background, border, text } from "./components";
import { withOpacity } from "../utils/color";
import { background, border, foreground, text } from "./components";

export default function search(colorScheme: ColorScheme) {
let layer = colorScheme.highest;
Expand All @@ -26,7 +27,8 @@ export default function search(colorScheme: ColorScheme) {
};

return {
matchBackground: background(layer), // theme.editor.highlight.match,
// TODO: Add an activeMatchBackground on the rust side to differenciate between active and inactive
matchBackground: withOpacity(foreground(layer, "accent"), 0.4),
tabIconSpacing: 8,
tabIconWidth: 14,
optionButton: {
Expand Down

0 comments on commit d66e490

Please sign in to comment.