Introduce Rope::clip_offset_utf16
This commit is contained in:
parent
bb55d654ce
commit
c46be992e0
3 changed files with 59 additions and 14 deletions
|
@ -248,7 +248,7 @@ fn test_text_summary_for_range() {
|
|||
buffer.text_summary_for_range::<TextSummary, _>(1..3),
|
||||
TextSummary {
|
||||
len: 2,
|
||||
len_utf16: 2,
|
||||
len_utf16: OffsetUtf16(2),
|
||||
lines: Point::new(1, 0),
|
||||
lines_utf16: PointUtf16::new(1, 0),
|
||||
first_line_chars: 1,
|
||||
|
@ -261,7 +261,7 @@ fn test_text_summary_for_range() {
|
|||
buffer.text_summary_for_range::<TextSummary, _>(1..12),
|
||||
TextSummary {
|
||||
len: 11,
|
||||
len_utf16: 11,
|
||||
len_utf16: OffsetUtf16(11),
|
||||
lines: Point::new(3, 0),
|
||||
lines_utf16: PointUtf16::new(3, 0),
|
||||
first_line_chars: 1,
|
||||
|
@ -274,7 +274,7 @@ fn test_text_summary_for_range() {
|
|||
buffer.text_summary_for_range::<TextSummary, _>(0..20),
|
||||
TextSummary {
|
||||
len: 20,
|
||||
len_utf16: 20,
|
||||
len_utf16: OffsetUtf16(20),
|
||||
lines: Point::new(4, 1),
|
||||
lines_utf16: PointUtf16::new(4, 1),
|
||||
first_line_chars: 2,
|
||||
|
@ -287,7 +287,7 @@ fn test_text_summary_for_range() {
|
|||
buffer.text_summary_for_range::<TextSummary, _>(0..22),
|
||||
TextSummary {
|
||||
len: 22,
|
||||
len_utf16: 22,
|
||||
len_utf16: OffsetUtf16(22),
|
||||
lines: Point::new(4, 3),
|
||||
lines_utf16: PointUtf16::new(4, 3),
|
||||
first_line_chars: 2,
|
||||
|
@ -300,7 +300,7 @@ fn test_text_summary_for_range() {
|
|||
buffer.text_summary_for_range::<TextSummary, _>(7..22),
|
||||
TextSummary {
|
||||
len: 15,
|
||||
len_utf16: 15,
|
||||
len_utf16: OffsetUtf16(15),
|
||||
lines: Point::new(2, 3),
|
||||
lines_utf16: PointUtf16::new(2, 3),
|
||||
first_line_chars: 4,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue