1
0
зеркало из https://github.com/glebtv/tui-textarea.git synced 2026-09-03 22:35:50 +03:00

refactor text selection and add more tests (fix #6)

Этот коммит содержится в:
rhysd
2023-11-12 17:39:48 +09:00
родитель 5a2649abe9
Коммит a54ce36d22
11 изменённых файлов: 1338 добавлений и 918 удалений

Просмотреть файл

@@ -15,6 +15,7 @@ Multi-line text editor can be easily put as part of your TUI application.
- Line number
- Cursor line highlight
- Search with regular expressions
- Text selection
- Mouse scrolling
- Yank support. Paste text deleted with `C-k`, `C-j`, ...
- Backend agnostic. [crossterm][], [termion][], [termwiz][], and your own backend are all supported
@@ -250,6 +251,8 @@ Default key mappings are as follows:
| `Alt+D`, `Alt+Delete` | Delete one word next to cursor |
| `Ctrl+U` | Undo |
| `Ctrl+R` | Redo |
| `Ctrl+C` | Copy selected text |
| `Ctrl+X` | Cut selected text |
| `Ctrl+Y` | Paste yanked text |
| `Ctrl+F`, `` | Move cursor forward by one character |
| `Ctrl+B`, `` | Move cursor backward by one character |
@@ -480,7 +483,11 @@ notify how to move the cursor.
| `textarea.delete_next_word()` | Delete one word next to cursor |
| `textarea.undo()` | Undo |
| `textarea.redo()` | Redo |
| `textarea.copy()` | Copy selected text |
| `textarea.cut()` | Cut selected text |
| `textarea.paste()` | Paste yanked text |
| `textarea.start_selection()` | Start text selection |
| `textarea.cancel_selection()` | Cancel text selection |
| `textarea.move_cursor(CursorMove::Forward)` | Move cursor forward by one character |
| `textarea.move_cursor(CursorMove::Back)` | Move cursor backward by one character |
| `textarea.move_cursor(CursorMove::Up)` | Move cursor up by one line |