From 7d26e332f002a48efa7235b128820caa1075b4bf Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Mon, 31 Oct 2022 11:26:05 -0600 Subject: [PATCH] Make cursor_moved private --- examples/terminal/src/main.rs | 2 +- src/editor.rs | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/examples/terminal/src/main.rs b/examples/terminal/src/main.rs index 2a06e6b..5bba79f 100644 --- a/examples/terminal/src/main.rs +++ b/examples/terminal/src/main.rs @@ -30,7 +30,7 @@ fn main() { buffer.set_text(" Hi, Rust! 🦀", attrs); // Perform shaping as desired - buffer.shape_until_cursor(); + buffer.shape_until_scroll(); // Default text color (0xFF, 0xFF, 0xFF is white) let text_color = Color::rgb(0xFF, 0xFF, 0xFF); diff --git a/src/editor.rs b/src/editor.rs index 052ca6c..147adf1 100644 --- a/src/editor.rs +++ b/src/editor.rs @@ -50,11 +50,7 @@ pub struct Editor<'a> { cursor: Cursor, cursor_x_opt: Option, select_opt: Option, - /// True if the cursor has been moved. Set to false after processing - /// - /// Usually, if this is true, you should run [Self::shape_until_cursor] before redrawing. - /// Otherwise, you should run [Self::shape_until_scroll] - pub cursor_moved: bool, + cursor_moved: bool, } impl<'a> Editor<'a> {