feat: enabled text-sizing and fixed OSC66 and DECCARA rendering behavior

- Added `textSizing` terminal capability and `tui.textSizing` setting for Kitty OSC66 scaling.
- Updated OSC66 range and visible-width handling to preserve grapheme slice behavior.
- Updated markdown rendering to apply heading text sizing only when enabled.
- Fixed DECCARA trailing-background fill tracking and DECRPM status 3/4 recognition.
This commit is contained in:
can1357
2026-06-04 01:33:48 +02:00
parent ea105b4211
commit 53aaced81f
16 changed files with 272 additions and 87 deletions
+3 -1
View File
@@ -202,7 +202,9 @@ export function visibleWidthRaw(str: string): number {
for (let i = 0; i < str.length; i++) {
const code = str.charCodeAt(i);
if (code < 0x20 || code > 0x7e) {
return str.includes("\u200d") ? visibleWidthByGrapheme(str) : nativeVisibleWidth(str, getDefaultTabWidth());
const tabWidth = getDefaultTabWidth();
if (str.includes("\x1b]66;")) return nativeVisibleWidth(str, tabWidth);
return str.includes("\u200d") ? visibleWidthByGrapheme(str) : nativeVisibleWidth(str, tabWidth);
}
}
return str.length;