From 079778cbf95b5eca2d780de6b6eaee78b1554689 Mon Sep 17 00:00:00 2001 From: "Andrew Wheeler(Genusis)" Date: Tue, 25 Oct 2022 10:57:42 -0400 Subject: [PATCH] Moved the shape until cursor outside of the loop --- examples/editor-orbclient/src/main.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/examples/editor-orbclient/src/main.rs b/examples/editor-orbclient/src/main.rs index 0b632cf..8bf23cd 100644 --- a/examples/editor-orbclient/src/main.rs +++ b/examples/editor-orbclient/src/main.rs @@ -98,7 +98,9 @@ fn main() { let mut mouse_x = -1; let mut mouse_y = -1; let mut mouse_left = false; - let mut shape_me = true; + + //Lets do this once and rely on events for the rest. + buffer.shape_until_cursor(); loop { let font_size = buffer.metrics().font_size; @@ -106,12 +108,6 @@ fn main() { let mut force_drag = true; - //lets do this once and rely on the events to do the rest. - if shape_me { - buffer.shape_until_cursor(); - shape_me = false; - } - if buffer.redraw { let instant = Instant::now();