David Verhasselt
2015-05-02 12:44:12 UTC
A couple of weeks ago the mouse-related code was refactored and a feature
was removed: This feature exited copy-mode when scrolling with the mouse
down past the bottom. Combined with the feature that entered copy-mode when
scrolling up with the mouse, this was useful to emulate intuitively
expected behaviour of scrolling in the terminal.
I liked that feature but also wanted to use the new refactored mouse code
(much better!), so I re-added it. I also added an option
"exit-copy-past-bottom" to enable or disable it. Because of the refactoring
the mouse event is now translated into a normal command "scroll-up", and
thus it's impossible (I think?) to make this work only when the mouse is
used to scroll. This means that when it's enabled, scrolling down when at
[0/x] with the keyboard will also exit copy mode.
This is my first patch for a C open source project and the core
contributors could probably do a much better job, if they wanted to re-add
this feature, but maybe for now it's useful to other people who would also
like this functionality.
Enable the option:
setw exit-copy-past-bottom on
By the way: to start copy-mode when scrolling you can just use this, no
patch necessary:
bind -n WheelUpPane copy-mode
Cheers,
David
was removed: This feature exited copy-mode when scrolling with the mouse
down past the bottom. Combined with the feature that entered copy-mode when
scrolling up with the mouse, this was useful to emulate intuitively
expected behaviour of scrolling in the terminal.
I liked that feature but also wanted to use the new refactored mouse code
(much better!), so I re-added it. I also added an option
"exit-copy-past-bottom" to enable or disable it. Because of the refactoring
the mouse event is now translated into a normal command "scroll-up", and
thus it's impossible (I think?) to make this work only when the mouse is
used to scroll. This means that when it's enabled, scrolling down when at
[0/x] with the keyboard will also exit copy mode.
This is my first patch for a C open source project and the core
contributors could probably do a much better job, if they wanted to re-add
this feature, but maybe for now it's useful to other people who would also
like this functionality.
Enable the option:
setw exit-copy-past-bottom on
By the way: to start copy-mode when scrolling you can just use this, no
patch necessary:
bind -n WheelUpPane copy-mode
Cheers,
David