Refactor cursor API in Editor
Co-authored-by: Neeraj Jaiswal <neerajj85@gmail.com>
This commit is contained in:
parent
2ac62f7512
commit
63e9eeffb5
5 changed files with 95 additions and 47 deletions
|
|
@ -166,14 +166,17 @@ impl text::Editor for () {
|
|||
}
|
||||
|
||||
fn cursor(&self) -> text::editor::Cursor {
|
||||
text::editor::Cursor::Caret(Point::ORIGIN)
|
||||
text::editor::Cursor {
|
||||
position: text::editor::Position { line: 0, column: 0 },
|
||||
selection: None,
|
||||
}
|
||||
}
|
||||
|
||||
fn cursor_position(&self) -> (usize, usize) {
|
||||
(0, 0)
|
||||
fn selection(&self) -> text::editor::Selection {
|
||||
text::editor::Selection::Caret(Point::ORIGIN)
|
||||
}
|
||||
|
||||
fn selection(&self) -> Option<String> {
|
||||
fn copy(&self) -> Option<String> {
|
||||
None
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue