Make cursor_moved private
This commit is contained in:
parent
92cad6fe13
commit
7d26e332f0
2 changed files with 2 additions and 6 deletions
|
|
@ -30,7 +30,7 @@ fn main() {
|
||||||
buffer.set_text(" Hi, Rust! 🦀", attrs);
|
buffer.set_text(" Hi, Rust! 🦀", attrs);
|
||||||
|
|
||||||
// Perform shaping as desired
|
// Perform shaping as desired
|
||||||
buffer.shape_until_cursor();
|
buffer.shape_until_scroll();
|
||||||
|
|
||||||
// Default text color (0xFF, 0xFF, 0xFF is white)
|
// Default text color (0xFF, 0xFF, 0xFF is white)
|
||||||
let text_color = Color::rgb(0xFF, 0xFF, 0xFF);
|
let text_color = Color::rgb(0xFF, 0xFF, 0xFF);
|
||||||
|
|
|
||||||
|
|
@ -50,11 +50,7 @@ pub struct Editor<'a> {
|
||||||
cursor: Cursor,
|
cursor: Cursor,
|
||||||
cursor_x_opt: Option<i32>,
|
cursor_x_opt: Option<i32>,
|
||||||
select_opt: Option<Cursor>,
|
select_opt: Option<Cursor>,
|
||||||
/// True if the cursor has been moved. Set to false after processing
|
cursor_moved: bool,
|
||||||
///
|
|
||||||
/// 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,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Editor<'a> {
|
impl<'a> Editor<'a> {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue