diff --git a/examples/editor-libcosmic/src/text_box.rs b/examples/editor-libcosmic/src/text_box.rs index 457c547..2d07937 100644 --- a/examples/editor-libcosmic/src/text_box.rs +++ b/examples/editor-libcosmic/src/text_box.rs @@ -136,8 +136,6 @@ where let appearance = theme.appearance(); let text_color_u32 = appearance.text_color_u32(); - let buffer = self.buffer.lock().unwrap(); - let instant = Instant::now(); if let Some(background_color) = appearance.background_color { @@ -152,6 +150,8 @@ where ); } + let mut buffer = self.buffer.lock().unwrap(); + buffer.shape_until_cursor(); let buffer_x = layout.bounds().x; diff --git a/examples/editor-test/src/main.rs b/examples/editor-test/src/main.rs index e643a4a..6fbf02d 100644 --- a/examples/editor-test/src/main.rs +++ b/examples/editor-test/src/main.rs @@ -122,7 +122,7 @@ fn main() { log::debug!("Line {:?}", line); for c in line.chars() { - if c.is_control() { + if c.is_control() && c != '\t' { log::warn!("Ignoring control character {:?}", c); continue; }