On Thu, Jun 21, 2012 at 02:43:30PM +0200, Fabio Spelta wrote: > > > > > > What exactly is the functionality you are missing Fabio? > > > None about the mouse wheel actually. :) > > I just realized, though, that it could be coherent and handy to have > a similar behavior while scrolling with the keyboard (hjkl, the arrow keys, > or whatever one likes). > When you have reached the bottom of the buffer, if you press j or the down > arrow one more time, then you automatically exit the copy mode and get back > where you where. > > Does it makes sense to you?
Taking a very quick look at this, does the following help? diff --git a/trunk/window-copy.c b/trunk/window-copy.c index 7b2a8ae..3808a7a 100644 --- a/trunk/window-copy.c +++ b/trunk/window-copy.c @@ -1670,6 +1670,12 @@ window_copy_cursor_down(struct window_pane *wp, int scroll_only) struct screen *s = &data->screen; u_int ox, oy, px, py; + if (data->oy == 0) + { + window_pane_reset_mode(wp); + return; + } + oy = screen_hsize(data->backing) + data->cy - data->oy; ox = window_copy_find_length(wp, oy); if (data->cx != ox) { -- Thomas Adam ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users