diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dc12a2b..a120f6f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,3 +1,21 @@ +## Reporting an issue + +For reporting a bug, please make sure your report includes the following points. + +- How to reproduce it + - What text the textarea contained as pre-condition + - What operations you did + - What was the expected behavior + - What was the actual behavior +- Environment + - Your terminal + - Rust version + - `tui` crate version + +An example of bug report: https://github.com/rhysd/tui-textarea/issues/1 + +## Submitting a pull request + Please ensure that all tests and linter checks passed on your branch before creating a PR which modifies some source files. To run tests: diff --git a/README.md b/README.md index c132b6e..8a4aa44 100644 --- a/README.md +++ b/README.md @@ -340,6 +340,7 @@ notify how to move the cursor. | `textarea.move_cursor(CursorMove::Head)` | Move cursor to the head of line | | `textarea.move_cursor(CursorMove::Top)` | Move cursor to top of lines | | `textarea.move_cursor(CursorMove::Bottom)` | Move cursor to bottom of lines | +| `textarea.move_cursor(CursorMove::Jump(row, col))` | Move cursor to (row, col) position | To define your own key mappings, simply call the above methods in your code instead of `TextArea::input()` method. The following example defines modal key mappings like Vim.