Removed DisplayRow abstraction
This commit is contained in:
parent
b53d1eef71
commit
f8401394f5
4 changed files with 67 additions and 115 deletions
|
@ -12,7 +12,7 @@ use crate::{
|
|||
};
|
||||
use collections::{HashMap, HashSet};
|
||||
use editor::{
|
||||
display_map::{DisplayRow, ToDisplayPoint},
|
||||
display_map::ToDisplayPoint,
|
||||
scroll::{autoscroll::Autoscroll, scroll_amount::ScrollAmount},
|
||||
Anchor, Bias, ClipboardSelection, DisplayPoint, Editor,
|
||||
};
|
||||
|
@ -195,7 +195,7 @@ fn insert_line_above(_: &mut Workspace, _: &InsertLineAbove, cx: &mut ViewContex
|
|||
.map(|selection| selection.start.row())
|
||||
.collect();
|
||||
let edits = selection_start_rows.into_iter().map(|row| {
|
||||
let (indent, _) = map.line_indent(DisplayRow::new(row));
|
||||
let (indent, _) = map.line_indent(row);
|
||||
let start_of_line = map
|
||||
.clip_point(DisplayPoint::new(row, 0), Bias::Left)
|
||||
.to_point(&map);
|
||||
|
@ -229,7 +229,7 @@ fn insert_line_below(_: &mut Workspace, _: &InsertLineBelow, cx: &mut ViewContex
|
|||
.map(|selection| selection.end.row())
|
||||
.collect();
|
||||
let edits = selection_end_rows.into_iter().map(|row| {
|
||||
let (indent, _) = map.line_indent(DisplayRow::new(row));
|
||||
let (indent, _) = map.line_indent(row);
|
||||
let end_of_line = map
|
||||
.clip_point(DisplayPoint::new(row, map.line_len(row)), Bias::Left)
|
||||
.to_point(&map);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue