-
Notifications
You must be signed in to change notification settings - Fork 0
chore(fmt): prettier --write pass #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -808,7 +808,7 @@ export class CanvasRenderer { | |
| // we cannot infer it from the RGB triple because (0,0,0) is a valid | ||
| // explicit color (programs emit it for "true black" backgrounds, e.g. | ||
| // letterboxed image renderings). | ||
| const useThemeBg = (cell.flags & CellFlags.INVERSE) ? cell.fgIsDefault : cell.bgIsDefault; | ||
| const useThemeBg = cell.flags & CellFlags.INVERSE ? cell.fgIsDefault : cell.bgIsDefault; | ||
| if (!useThemeBg) { | ||
| this.ctx.fillStyle = this.rgbToCSS(bg_r, bg_g, bg_b); | ||
| this.ctx.fillRect(cellX, cellY, cellWidth, this.metrics.height); | ||
|
|
@@ -873,7 +873,7 @@ export class CanvasRenderer { | |
| // Same reasoning as the bg path: only fall back to theme.foreground | ||
| // when the cell has the default fg (tag NONE), not when its explicit | ||
| // RGB happens to be (0,0,0). | ||
| const useThemeFg = (cell.flags & CellFlags.INVERSE) ? cell.bgIsDefault : cell.fgIsDefault; | ||
| const useThemeFg = cell.flags & CellFlags.INVERSE ? cell.bgIsDefault : cell.fgIsDefault; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similarly, the logic for |
||
| this.ctx.fillStyle = useThemeFg ? this.theme.foreground : this.rgbToCSS(fg_r, fg_g, fg_b); | ||
| } | ||
|
|
||
|
|
@@ -1213,8 +1213,7 @@ export class CanvasRenderer { | |
| if (quads & QUAD_UL) this.ctx.fillRect(cellX, cellY, halfW, halfH); | ||
| if (quads & QUAD_UR) this.ctx.fillRect(cellX + halfW, cellY, w - halfW, halfH); | ||
| if (quads & QUAD_LL) this.ctx.fillRect(cellX, cellY + halfH, halfW, h - halfH); | ||
| if (quads & QUAD_LR) | ||
| this.ctx.fillRect(cellX + halfW, cellY + halfH, w - halfW, h - halfH); | ||
| if (quads & QUAD_LR) this.ctx.fillRect(cellX + halfW, cellY + halfH, w - halfW, h - halfH); | ||
| return true; | ||
| } | ||
|
|
||
|
|
||
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.
The logic for determining
useThemeBgwhenCellFlags.INVERSEis set appears to be incorrect for cells using default colors. IfINVERSEis set andcell.fgIsDefaultis true,useThemeBgbecomes true, which causes the cell to skip painting its background (leaving it as the defaulttheme.background). However, an inverted cell with a default foreground should have its background painted withtheme.foregroundto reflect the inversion.