15m32: protectCut加英文词保护(切点劈ASCII英文单词中间回退到词前), 修BUG被劈成B+UG; 配合编号保护让P18填满115不留白
Auto Release / build (push) Successful in 2m46s

This commit is contained in:
youpaishidifu
2026-11-23 22:55:55 +08:00
parent 526fd473c3
commit 1b300149f5
@@ -553,6 +553,14 @@ public class CustomScreenManager implements Listener {
return Math.max(phraseStart - 1, cut - 12); // 回退到最外层"第"前, 整串编号翻页
}
}
// 15m32: 英文词保护 - 切点若劈在ASCII英文单词中间(前字=字母且后字=字母), 回退到单词起点前
char prev = s.charAt(cut - 1);
char next = (cut < s.length()) ? s.charAt(cut) : 0;
if (Character.isLetter(prev) && Character.isLetter(next) && prev < 128 && next < 128) {
int wordStart = cut;
while (wordStart > 0 && Character.isLetter(s.charAt(wordStart - 1)) && s.charAt(wordStart - 1) < 128) wordStart--;
return Math.max(wordStart, cut - 12); // 回退到英文单词前
}
return cut;
}