Changed default wrap algorithm from OptimalFit to FirstFit (#7960)

Codex identified this as the cause of a reported hang:
https://github.com/openai/codex/issues/7822. Apparently, the wrapping
algorithm we're using has known issues and bad worst-case behaviors when
OptimalFit is used on certain strings. It recommended switching to
FirstFit instead.
This commit is contained in:
Eric Traut authored and GitHub committed 2025-12-12 21:47:37 -08:00
1 parent 6ec2831b91
commit 1ad261d681
6 files changed
+20 -30

No files matched your search

+2 -2
View File
@@ -595,8 +595,8 @@ mod tests {
lines,
vec![
"- outer item with".to_string(),
" several words".to_string(),
" to wrap".to_string(),
" several words to".to_string(),
" wrap".to_string(),
" - inner item".to_string(),
" that also".to_string(),
" needs wrapping".to_string(),