aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/text.rs2
-rw-r--r--src/text/rich.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/text.rs b/src/text.rs
index 648238f..ac51395 100644
--- a/src/text.rs
+++ b/src/text.rs
@@ -444,7 +444,7 @@ where
}
Event::Mouse(mouse::Event::CursorMoved { .. })
| Event::Touch(touch::Event::FingerMoved { .. }) => {
- if let Some(position) = cursor.position()
+ if let Some(position) = cursor.land().position()
&& let Some(dragging) = state.dragging
{
let (line, index) = state
diff --git a/src/text/rich.rs b/src/text/rich.rs
index 30a9e81..9f53387 100644
--- a/src/text/rich.rs
+++ b/src/text/rich.rs
@@ -661,7 +661,7 @@ where
}
Event::Mouse(mouse::Event::CursorMoved { .. })
| Event::Touch(touch::Event::FingerMoved { .. }) => {
- if let Some(position) = cursor.position()
+ if let Some(position) = cursor.land().position()
&& let Some(dragging) = state.dragging
{
let (line, index) = state