Handle wrap-pending cursor in row highlight

This commit is contained in:
bincxz committed 2026-07-31 12:44:03 +08:00
1 parent e2fb4251fe
commit ed4e02e96f
2 files changed
+20 -2

No files matched your search

@@ -217,8 +217,8 @@ export class CursorLineHighlighter implements IDisposable {
private getTailRanges(contentEnd: number, cols: number, cursorX: number): HighlightRange[] {
if (contentEnd >= cols) return [];
const cursorColumn = cursorX >= 0 && cursorX < cols ? cursorX : null;
if (cursorColumn === null || cursorColumn < contentEnd) {
const cursorColumn = Math.min(Math.max(cursorX, 0), cols - 1);
if (cursorColumn < contentEnd) {
return [{ x: contentEnd, width: cols - contentEnd }];
}
return [