mirror of
https://github.com/tmate-io/tmate.git
synced 2024-11-27 10:33:09 +01:00
Fix window choice mode, again.
This commit is contained in:
parent
57f5f44d0f
commit
5803c4fc5b
2
TODO
2
TODO
@ -91,8 +91,6 @@
|
|||||||
- test bug sshing from freebsd console
|
- test bug sshing from freebsd console
|
||||||
- better support for stupid margin terminals. strcmp for cons25 sucks, how can
|
- better support for stupid margin terminals. strcmp for cons25 sucks, how can
|
||||||
these be autodetected?
|
these be autodetected?
|
||||||
- the escape timer for M- is too short for escape+key. fiddle with it
|
|
||||||
- page up/down in choose mode is STILL broken. damn
|
|
||||||
- set-option should be set-session-option and should be overall global options
|
- set-option should be set-session-option and should be overall global options
|
||||||
for stuff like mode keys?
|
for stuff like mode keys?
|
||||||
- document status-keys
|
- document status-keys
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $Id: window-choose.c,v 1.12 2009-02-21 17:46:13 nicm Exp $ */
|
/* $Id: window-choose.c,v 1.13 2009-03-02 17:01:00 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
|
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -237,10 +237,13 @@ 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 (screen_size_y(s) < items) {
|
||||||
|
if (data->top + screen_size_y(s) > items)
|
||||||
|
data->top = items - screen_size_y(s);
|
||||||
|
} else
|
||||||
|
data->top = 0;
|
||||||
if (data->selected < data->top)
|
if (data->selected < data->top)
|
||||||
data->top = data->selected;
|
data->top = data->selected;
|
||||||
if (data->top + screen_size_y(s) > items)
|
|
||||||
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