summaryrefslogtreecommitdiffstats
path: root/native/src/widget
diff options
context:
space:
mode:
authorLibravatar FabianLars <fabianlars@fabianlars.de>2020-02-26 21:58:34 +0100
committerLibravatar FabianLars <fabianlars@fabianlars.de>2020-02-26 21:58:34 +0100
commit1ad83889be32b1bdb746e751aa620fad85b864b0 (patch)
treea39c7744464b519e725f864a922216a4a802ec44 /native/src/widget
parent0d8d236be65abf98a09a13b2e22b677f3d95f195 (diff)
downloadiced-1ad83889be32b1bdb746e751aa620fad85b864b0.tar.gz
iced-1ad83889be32b1bdb746e751aa620fad85b864b0.tar.bz2
iced-1ad83889be32b1bdb746e751aa620fad85b864b0.zip
really small cleanup
Diffstat (limited to 'native/src/widget')
-rw-r--r--native/src/widget/text_input/cursor.rs7
1 files changed, 1 insertions, 6 deletions
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 } => {