widgets(terminal): implement CSI D
This commit is contained in:
parent
21f2a48a80
commit
cc77c98d32
1 changed files with 16 additions and 0 deletions
|
@ -281,6 +281,22 @@ fn run(self: *Terminal) !void {
|
||||||
self.back_screen.width,
|
self.back_screen.width,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
'D' => {
|
||||||
|
self.back_screen.cursor.pending_wrap = false;
|
||||||
|
var iter = seq.iterator(u16);
|
||||||
|
const delta = iter.next() orelse 1;
|
||||||
|
const within = self.back_screen.withinScrollingRegion();
|
||||||
|
if (within)
|
||||||
|
self.back_screen.cursor.col = @max(
|
||||||
|
self.back_screen.cursor.col -| delta,
|
||||||
|
self.back_screen.scrolling_region.left,
|
||||||
|
)
|
||||||
|
else
|
||||||
|
self.back_screen.cursor.col = @max(
|
||||||
|
self.back_screen.cursor.col -| delta,
|
||||||
|
0,
|
||||||
|
);
|
||||||
|
},
|
||||||
'H', 'f' => { // CUP
|
'H', 'f' => { // CUP
|
||||||
var iter = seq.iterator(u16);
|
var iter = seq.iterator(u16);
|
||||||
const row = iter.next() orelse 1;
|
const row = iter.next() orelse 1;
|
||||||
|
|
Loading…
Reference in a new issue