fix(tui): align overlays over CJK wide cells

closes #5297
This commit is contained in:
Armin Ronacher
2026-06-15 01:06:15 +02:00
parent ba0ec61563
commit 5b6058c3a7
3 changed files with 70 additions and 1 deletions

View File

@@ -1156,7 +1156,7 @@ export function extractSegments(
for (const { segment } of graphemeSegmenter.segment(line.slice(i, textEnd))) {
const w = graphemeWidth(segment);
if (currentCol < beforeEnd) {
if (currentCol < beforeEnd && currentCol + w <= beforeEnd) {
if (pendingAnsiBefore) {
before += pendingAnsiBefore;
pendingAnsiBefore = "";