Scroll sideways with Shift or Alt and the wheel, and in the outline
A wheel that tilts (or a touchpad) already panned the canvas sideways, but only when the terminal passes those events on, and many don't: Windows Terminal only does since 1.24, and Windows' own console layer can drop them. The wheel with Shift held now scrolls sideways too, as in most apps, and so does Alt, since Alacritty and Windows Terminal keep Shift with the mouse for selecting text. The outline scrolls sideways as well (the wheel, zh and zl), for rows wider than its pane: a deep tree or a long title. Clicks land where the rows are, however far they're scrolled, and when the cursor moves its title comes back into view. Fixed on the way: the wheel turned sideways over the help, the menu, a picker or the K card moved it up. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
c587c42115
commit
e6f3c06ecc
8 files changed
+203
-16
No files matched your search
+4
-2
@@ -470,7 +470,8 @@ impl Popup {
|
||||
};
|
||||
let outcome = match gesture {
|
||||
Gesture::Press { at, .. } => list.click(position(at)),
|
||||
Gesture::Scroll { direction, .. } => {
|
||||
// Up and down only: a list has nothing to the side.
|
||||
Gesture::Scroll { direction: direction @ (Direction::Up | Direction::Down), .. } => {
|
||||
list.wheel(direction == Direction::Down);
|
||||
ListOutcome::Stay
|
||||
}
|
||||
@@ -742,7 +743,8 @@ impl Card {
|
||||
};
|
||||
vec![Action::App(AppAction::StartEdit(StartEdit::Body { at, in_card: true }))]
|
||||
}
|
||||
Gesture::Scroll { direction, .. } => {
|
||||
// Up and down only: the card wraps its text, so nothing is to the side.
|
||||
Gesture::Scroll { direction: direction @ (Direction::Up | Direction::Down), .. } => {
|
||||
self.view.scroll_by(if direction == Direction::Down { 3 } else { -3 });
|
||||
Vec::new()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user