1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 22:53:14 -04:00
This commit is contained in:
Emil Ernerfeldt
2025-03-28 16:09:40 +01:00
parent 2fb0764a24
commit 33ff4bd7da

View File

@@ -811,13 +811,12 @@ impl GalleyCache {
) -> Galley {
profiling::function_scope!();
let mut current = 0;
let mut start = 0;
let mut max_rows_remaining = job.wrap.max_rows;
let mut galleys = Vec::new();
while current < job.text.len() {
let is_first_paragraph = current == 0;
let start = current;
while start < job.text.len() {
let is_first_paragraph = start == 0;
let end = job.text[start..]
.find('\n')
.map_or(job.text.len(), |i| start + i + 1);
@@ -887,7 +886,7 @@ impl GalleyCache {
break;
}
current = end;
start = end;
}
Galley::concat(job, &galleys, fonts.pixels_per_point)