From d016971a5f39c71a00927213ce2897b3c3f318d1 Mon Sep 17 00:00:00 2001 From: achristmascarl Date: Tue, 30 Jul 2024 15:09:03 -0400 Subject: [PATCH] update tests, examples, readme --- README.md | 1 + examples/vim.rs | 5 +++++ tests/cursor.rs | 1 + 3 files changed, 7 insertions(+) diff --git a/README.md b/README.md index 579223d..2cb125c 100644 --- a/README.md +++ b/README.md @@ -497,6 +497,7 @@ notify how to move the cursor. | `textarea.move_cursor(CursorMove::Up)` | Move cursor up by one line | | `textarea.move_cursor(CursorMove::Down)` | Move cursor down by one line | | `textarea.move_cursor(CursorMove::WordForward)` | Move cursor forward by word | +| `textarea.move_cursor(CursorMove::WordEnd)` | Move cursor to next end of word | | `textarea.move_cursor(CursorMove::WordBack)` | Move cursor backward by word | | `textarea.move_cursor(CursorMove::ParagraphForward)` | Move cursor up by paragraph | | `textarea.move_cursor(CursorMove::ParagraphBack)` | Move cursor down by paragraph | diff --git a/examples/vim.rs b/examples/vim.rs index d182fc4..3977f80 100644 --- a/examples/vim.rs +++ b/examples/vim.rs @@ -112,6 +112,11 @@ impl Vim { key: Key::Char('w'), .. } => textarea.move_cursor(CursorMove::WordForward), + Input { + key: Key::Char('e'), + ctrl: false, + .. + } => textarea.move_cursor(CursorMove::WordEnd), Input { key: Key::Char('b'), ctrl: false, diff --git a/tests/cursor.rs b/tests/cursor.rs index b35ca3c..22b09e2 100644 --- a/tests/cursor.rs +++ b/tests/cursor.rs @@ -17,6 +17,7 @@ fn empty_textarea() { Top, Bottom, WordForward, + WordEnd, WordBack, ParagraphForward, ParagraphBack,