mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-17 13:01:24 +00:00
Handle wrap-pending cursor in row highlight
This commit is contained in:
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 [
|
||||
|
||||
Reference in new issue
Block a user