mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-20 10:46:07 +03:00
Merge pull request #988 from mitchellh/scroll-cursor-key
core: alternate scroll encoding should respect DECCKM
This commit is contained in:
@ -1474,7 +1474,13 @@ pub fn scrollCallback(
|
|||||||
// clear the selection.
|
// clear the selection.
|
||||||
self.setSelection(null);
|
self.setSelection(null);
|
||||||
|
|
||||||
const seq = if (y.delta < 0) "\x1bOA" else "\x1bOB";
|
const seq = if (self.io.terminal.modes.get(.cursor_keys)) seq: {
|
||||||
|
// cursor key: application mode
|
||||||
|
break :seq if (y.delta < 0) "\x1bOA" else "\x1bOB";
|
||||||
|
} else seq: {
|
||||||
|
// cursor key: normal mode
|
||||||
|
break :seq if (y.delta < 0) "\x1b[A" else "\x1b[B";
|
||||||
|
};
|
||||||
for (0..y.delta_unsigned) |_| {
|
for (0..y.delta_unsigned) |_| {
|
||||||
_ = self.io_thread.mailbox.push(.{
|
_ = self.io_thread.mailbox.push(.{
|
||||||
.write_stable = seq,
|
.write_stable = seq,
|
||||||
|
Reference in New Issue
Block a user