From 9b2bfbf3cb178aa7c2a3efd3297cfcc7392c18c5 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Fri, 21 Oct 2022 12:40:29 -0600 Subject: [PATCH] Fix UDHR test and libcosmic compilation --- examples/editor-libcosmic/src/text_box.rs | 4 ++-- examples/editor-test/src/main.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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; }