mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-12 13:24:19 +00:00
Merge pull request #2229 from zed-industries/fix-click-range-bug
Fix off by one error in click ranges
This commit is contained in:
commit
2e1adb0724
1 changed files with 2 additions and 1 deletions
|
@ -221,7 +221,8 @@ impl EditorElement {
|
|||
position_to_display_point(e.position, text_bounds, &position_map);
|
||||
if let Some(point) = point {
|
||||
for (range, callback) in click_ranges.iter() {
|
||||
if range.contains(&point) {
|
||||
// Range -> RangeInclusive
|
||||
if range.contains(&point) || range.end == point {
|
||||
callback(&e, range, &position_map.snapshot, cx)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue