Get editor2 compiling with a ton of code commented out
This commit is contained in:
parent
f3b8a9d8c2
commit
fbee6b5352
12 changed files with 582 additions and 552 deletions
|
@ -2704,10 +2704,11 @@ impl PositionMap {
|
|||
let y = position.y.max(px(0.)).min(self.size.width);
|
||||
let x = position.x + (scroll_position.x * self.em_width);
|
||||
let row = (f32::from(y / self.line_height) + scroll_position.y) as u32;
|
||||
|
||||
let (column, x_overshoot_after_line_end) = if let Some(line) = self
|
||||
.line_layouts
|
||||
.get(row as usize - scroll_position.y.into())
|
||||
.map(|LineWithInvisibles { line, .. }| line)
|
||||
.get(row as usize - scroll_position.y as usize)
|
||||
.map(|&LineWithInvisibles { ref line, .. }| line)
|
||||
{
|
||||
if let Some(ix) = line.index_for_x(x) {
|
||||
(ix as u32, px(0.))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue