mirror of
https://github.com/tmux/tmux.git
synced 2024-11-08 04:08:49 +00:00
Fix page down, again.
This commit is contained in:
parent
2bf9f4973b
commit
b4076865bb
1
TODO
1
TODO
@ -90,4 +90,3 @@
|
||||
- document find-window
|
||||
- document split-window -p and -l
|
||||
- attach should have a flag to create session if it doesn't exist
|
||||
- fix page up/down in choice mode AGAIN
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: window-choose.c,v 1.9 2009-01-28 22:00:22 nicm Exp $ */
|
||||
/* $Id: window-choose.c,v 1.10 2009-01-29 20:02:33 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -235,12 +235,10 @@ window_choose_key(struct window_pane *wp, unused struct client *c, int key)
|
||||
if (data->selected > items - 1)
|
||||
data->selected = items - 1;
|
||||
data->top += screen_size_y(s);
|
||||
if (data->top + screen_size_y(s) - 1 > data->selected) {
|
||||
if (items < screen_size_y(s) - 1)
|
||||
data->top = 0;
|
||||
else
|
||||
data->top = items - screen_size_y(s);
|
||||
}
|
||||
if (data->selected < data->top)
|
||||
data->top = data->selected;
|
||||
if (data->top + screen_size_y(s) > items)
|
||||
data->top = items - screen_size_y(s);
|
||||
window_choose_redraw_screen(wp);
|
||||
break;
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user