From 2f38bc46a588fc5f10907cef57e337e2ff549158 Mon Sep 17 00:00:00 2001 From: rhysd Date: Thu, 16 Jun 2022 18:30:25 +0900 Subject: [PATCH] allow to change cursor style --- examples/editor.rs | 3 +-- src/textarea.rs | 38 +++++++++++++++++++++++++++++++++++--- 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/examples/editor.rs b/examples/editor.rs index f38b74a..e5afc0f 100644 --- a/examples/editor.rs +++ b/examples/editor.rs @@ -200,6 +200,5 @@ impl<'a> Drop for Editor<'a> { } fn main() -> io::Result<()> { - let mut editor = Editor::new(env::args_os().skip(1))?; - editor.run() + Editor::new(env::args_os().skip(1))?.run() } diff --git a/src/textarea.rs b/src/textarea.rs index fc06fa9..6968800 100644 --- a/src/textarea.rs +++ b/src/textarea.rs @@ -44,6 +44,7 @@ pub struct TextArea<'a> { cursor_line_style: Style, line_number_style: Option