summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--native/src/input/mouse.rs3
-rw-r--r--native/src/widget/text_input/cursor.rs7
2 files changed, 2 insertions, 8 deletions
diff --git a/native/src/input/mouse.rs b/native/src/input/mouse.rs
index eaac52f3..ca3daeb1 100644
--- a/native/src/input/mouse.rs
+++ b/native/src/input/mouse.rs
@@ -36,8 +36,7 @@ impl Default for State {
impl State {
/// processes left click to check for double/triple clicks
- /// return amount of repetitive mouse clicks
- /// (1 -> double click, 2 -> triple click)
+ /// return amount of repetitive mouse clicks as enum
pub fn update(&mut self, position: Point) -> Interaction {
self.last_click = match self.last_click {
None => Some(Interaction::Click(position)),
diff --git a/native/src/widget/text_input/cursor.rs b/native/src/widget/text_input/cursor.rs
index 307040eb..92fd2029 100644
--- a/native/src/widget/text_input/cursor.rs
+++ b/native/src/widget/text_input/cursor.rs
@@ -56,7 +56,6 @@ impl Cursor {
/* end of index move methods */
/* expand/shrink selection */
- // TODO: (whole section): Return State::Cursor if start == end after operation
pub fn select_range(&mut self, start: usize, end: usize) {
if start != end {
self.state = State::Selection { start, end };
@@ -149,10 +148,6 @@ impl Cursor {
}
}
- pub fn draw_position(&self, value: &Value) -> usize {
- self.cursor_position(value)
- }
-
pub fn cursor_position(&self, value: &Value) -> usize {
match self.state {
State::Index(index) => index.min(value.len()),
@@ -161,7 +156,7 @@ impl Cursor {
}
// returns Option of left and right border of selection
- // a second method return start and end may be useful (see below)
+ // a second method that returns start and end may be useful (see below)
pub fn selection_position(&self) -> Option<(usize, usize)> {
match self.state {
State::Selection { start, end } => {