aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoe Wilm <joe@jwilm.com>2016-06-06 17:43:14 -0700
committerJoe Wilm <joe@jwilm.com>2016-06-06 17:43:14 -0700
commit1a7eda7b0523c7c9d754258a1531feccd0cd1cc5 (patch)
tree9ba1e94525da90020a9d8685a48608a38fe93dd1 /src
parent263a4e8a2e835d9bd5a6410b724ff05aa04de643 (diff)
downloadalacritty-1a7eda7b0523c7c9d754258a1531feccd0cd1cc5.tar.gz
alacritty-1a7eda7b0523c7c9d754258a1531feccd0cd1cc5.zip
Terminal sets more attributes on grid Cells
Diffstat (limited to 'src')
-rw-r--r--src/grid.rs5
-rw-r--r--src/term.rs14
2 files changed, 12 insertions, 7 deletions
diff --git a/src/grid.rs b/src/grid.rs
index f5c98afb..3b3acf9b 100644
--- a/src/grid.rs
+++ b/src/grid.rs
@@ -24,7 +24,10 @@ pub struct Cell {
bitflags! {
pub flags CellFlags: u32 {
- const INVERSE = 0b00000001,
+ const INVERSE = 0b00000001,
+ const BOLD = 0b00000010,
+ const ITALIC = 0b00000100,
+ const UNDERLINE = 0b00001000,
}
}
diff --git a/src/term.rs b/src/term.rs
index a552ee5d..b25502f1 100644
--- a/src/term.rs
+++ b/src/term.rs
@@ -355,12 +355,14 @@ impl ansi::Handler for Term {
self.bg = DEFAULT_BG;
self.attr = CellFlags::empty();
},
- Attr::Reverse => {
- self.attr.insert(grid::INVERSE);
- },
- Attr::CancelReverse => {
- self.attr.remove(grid::INVERSE);
- },
+ Attr::Reverse => self.attr.insert(grid::INVERSE),
+ Attr::CancelReverse => self.attr.remove(grid::INVERSE),
+ Attr::Bold => self.attr.insert(grid::BOLD),
+ Attr::CancelBoldDim => self.attr.remove(grid::BOLD),
+ Attr::Italic => self.attr.insert(grid::ITALIC),
+ Attr::CancelItalic => self.attr.remove(grid::ITALIC),
+ Attr::Underscore => self.attr.insert(grid::UNDERLINE),
+ Attr::CancelUnderline => self.attr.remove(grid::UNDERLINE),
_ => {
println!("Term got unhandled attr: {:?}", attr);
}