aboutsummaryrefslogtreecommitdiff
path: root/helix-view
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-11-22 02:09:09 +0000
committerBlaž Hrastnik2021-11-22 02:09:09 +0000
commit5f329a22c48ebf586da12323b6e1f45e9d78fdc1 (patch)
tree120fe74b4c53b6631f54c7235a40b9f33381c384 /helix-view
parent3b3c396ca4da14b2df8ffd3f9ef3abede3c72a4e (diff)
dap: Modify breakpoints in place with no cloning
Diffstat (limited to 'helix-view')
-rw-r--r--helix-view/src/view.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-view/src/view.rs b/helix-view/src/view.rs
index 02aa1327..3066801b 100644
--- a/helix-view/src/view.rs
+++ b/helix-view/src/view.rs
@@ -253,7 +253,7 @@ impl View {
/// Translates screen coordinates into coordinates on the gutter of the view.
/// Returns a tuple of usize typed line and column numbers starting with 0.
/// Returns None if coordinates are not on the gutter.
- pub fn gutter_coords_at_screen_coords(&self, row: u16, column: u16) -> Option<(usize, usize)> {
+ pub fn gutter_coords_at_screen_coords(&self, row: u16, column: u16) -> Option<Position> {
// 1 for status
if row < self.area.top() || row >= self.area.bottom() {
return None;
@@ -263,7 +263,7 @@ impl View {
return None;
}
- Some((
+ Some(Position::new(
(row - self.area.top()) as usize,
(column - self.area.left()) as usize,
))