Add more debug printing
This commit is contained in:
parent
4bc4119987
commit
ae07753242
10
src/term.rs
10
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
|
/// RAII type which manages grid state for render
|
||||||
///
|
///
|
||||||
/// This manages the cursor during a render. The cursor location is inverted to
|
/// 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
|
/// A character to be displayed
|
||||||
#[inline]
|
#[inline]
|
||||||
fn input(&mut self, c: char) {
|
fn input(&mut self, c: char) {
|
||||||
|
debug_print!("{}", c);
|
||||||
self.set_char(c);
|
self.set_char(c);
|
||||||
self.cursor.col += 1;
|
self.cursor.col += 1;
|
||||||
}
|
}
|
||||||
|
@ -710,6 +719,7 @@ impl ansi::Handler for Term {
|
||||||
/// set a terminal attribute
|
/// set a terminal attribute
|
||||||
#[inline]
|
#[inline]
|
||||||
fn terminal_attribute(&mut self, attr: Attr) {
|
fn terminal_attribute(&mut self, attr: Attr) {
|
||||||
|
debug_println!("Set Attribute: {:?}", attr);
|
||||||
match attr {
|
match attr {
|
||||||
Attr::DefaultForeground => {
|
Attr::DefaultForeground => {
|
||||||
self.fg = DEFAULT_FG;
|
self.fg = DEFAULT_FG;
|
||||||
|
|
Loading…
Reference in New Issue