mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-22 19:56:08 +03:00
terminal: CUL handles left/right margins
This commit is contained in:
@ -1329,12 +1329,13 @@ pub fn cursorLeft(self: *Terminal, count_req: usize) void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// The margins we can move to.
|
// The margins we can move to.
|
||||||
// TODO: if cursor is left of the left margin, assume left margin to be 0.
|
|
||||||
// verified with xterm. don't forget when left margins are implemented!
|
|
||||||
const left_margin = 0;
|
|
||||||
const right_margin = self.cols - 1;
|
|
||||||
const top = self.scrolling_region.top;
|
const top = self.scrolling_region.top;
|
||||||
const bottom = self.scrolling_region.bottom;
|
const bottom = self.scrolling_region.bottom;
|
||||||
|
const right_margin = self.scrolling_region.right;
|
||||||
|
const left_margin = if (self.screen.cursor.x < self.scrolling_region.left)
|
||||||
|
0
|
||||||
|
else
|
||||||
|
self.scrolling_region.left;
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
// We can move at most to the left margin.
|
// We can move at most to the left margin.
|
||||||
|
Reference in New Issue
Block a user