mirror of
https://github.com/tmux/tmux.git
synced 2024-11-16 09:28:51 +00:00
Fix this properly...
This commit is contained in:
parent
374b0d85b8
commit
2cbd21ea44
@ -1,4 +1,4 @@
|
|||||||
/* $Id: window-choose.c,v 1.4 2009-01-23 17:14:30 nicm Exp $ */
|
/* $Id: window-choose.c,v 1.5 2009-01-23 20:17:04 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
|
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -231,8 +231,12 @@ window_choose_key(struct window_pane *wp, unused struct client *c, int key)
|
|||||||
if (data->selected > items - 1)
|
if (data->selected > items - 1)
|
||||||
data->selected = items - 1;
|
data->selected = items - 1;
|
||||||
data->top += screen_size_y(s);
|
data->top += screen_size_y(s);
|
||||||
if (data->top + screen_size_y(s) - 1 > data->selected)
|
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);
|
data->top = items - screen_size_y(s);
|
||||||
|
}
|
||||||
window_choose_redraw_screen(wp);
|
window_choose_redraw_screen(wp);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user