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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user