summaryrefslogtreecommitdiffstats
path: root/src/renderer/mod.rs
diff options
context:
space:
mode:
authorChristian Duerr <chrisduerr@users.noreply.github.com>2018-09-19 19:18:51 +0000
committerGitHub <noreply@github.com>2018-09-19 19:18:51 +0000
commitd387ebe1d7fe9f9fe9d840039aba68efffe5a233 (patch)
tree626999eaf8ff0e848d574953135c4a93b8041121 /src/renderer/mod.rs
parentf0ce64e24b2ad3cce0a223d17f04413cd6c49810 (diff)
Add hidden escape sequence
This adds support for the `hidden` escape sequence `\e[8m`, which will render the text as invisible. This has also raised a few questions about the rendering of foreground and background colors and their interaction with the different escape sequences. Previously, Alacritty has oriented itself after URxvt, which has some strange and unexpected behavior. The new implementation of color inversion is modeled after XTerm, which has a consistent pattern of always inverting the foreground and background colors. This should hopefully lead to less confusion for the user and a more consistent behavior. A full matrix showcasing the new way Alacritty inverses text can be found here: https://i.imgur.com/d1XavG7.png This fixes #1454 and fixes #1455.
Diffstat (limited to 'src/renderer/mod.rs')
-rw-r--r--src/renderer/mod.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/renderer/mod.rs b/src/renderer/mod.rs
index 68335e1c..b461db0c 100644
--- a/src/renderer/mod.rs
+++ b/src/renderer/mod.rs
@@ -835,12 +835,17 @@ impl<'a> RenderApi<'a> {
glyph_cache.font_key
};
- let glyph_key = GlyphKey {
+ let mut glyph_key = GlyphKey {
font_key,
size: glyph_cache.font_size,
c: cell.c
};
+ // Don't render text of HIDDEN cells
+ if cell.flags.contains(cell::Flags::HIDDEN) {
+ glyph_key.c = ' ';
+ }
+
// Add cell to batch
{
let glyph = glyph_cache.get(glyph_key, self);