Fix crash and wrong columnar selection when mousing over block lines
This commit is contained in:
@@ -238,8 +238,10 @@ impl Line {
|
||||
None
|
||||
}
|
||||
|
||||
// If round_to_closest, find the closest index to the given x position
|
||||
// If !round_to_closest, find the largest index before the given x position
|
||||
pub fn len(&self) -> usize {
|
||||
self.layout.len
|
||||
}
|
||||
|
||||
pub fn index_for_x(&self, x: f32) -> Option<usize> {
|
||||
if x >= self.layout.width {
|
||||
None
|
||||
|
||||
Reference in New Issue
Block a user