diff options
author | Joe Wilm <joe@jwilm.com> | 2016-07-16 12:39:05 -0700 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2016-07-16 12:39:05 -0700 |
commit | ae07753242e0d8113ee208cc608faf9eadcaf404 (patch) | |
tree | 475d7039b7eedf430b3e186c5ea17d42a8eb0d1d /src | |
parent | 4bc411998786b0893a18df4d88012470d42abf91 (diff) | |
download | alacritty-ae07753242e0d8113ee208cc608faf9eadcaf404.tar.gz alacritty-ae07753242e0d8113ee208cc608faf9eadcaf404.zip |
Add more debug printing
Diffstat (limited to 'src')
-rw-r--r-- | src/term.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/term.rs b/src/term.rs index cf67a0e6..2a431168 100644 --- a/src/term.rs +++ b/src/term.rs @@ -32,6 +32,14 @@ macro_rules! debug_println { } } +macro_rules! debug_print { + ($($t:tt)*) => { + if cfg!(debug_assertions) { + print!($($t)*); + } + } +} + /// RAII type which manages grid state for render /// /// This manages the cursor during a render. The cursor location is inverted to @@ -453,6 +461,7 @@ impl ansi::Handler for Term { /// A character to be displayed #[inline] fn input(&mut self, c: char) { + debug_print!("{}", c); self.set_char(c); self.cursor.col += 1; } @@ -710,6 +719,7 @@ impl ansi::Handler for Term { /// set a terminal attribute #[inline] fn terminal_attribute(&mut self, attr: Attr) { + debug_println!("Set Attribute: {:?}", attr); match attr { Attr::DefaultForeground => { self.fg = DEFAULT_FG; |