mirror of
https://github.com/tmux/tmux.git
synced 2025-01-14 12:48:56 +00:00
Bug fix; don't bail except on first line when printing.
This commit is contained in:
parent
2013dc4266
commit
9a37eb4d94
@ -1,4 +1,4 @@
|
||||
/* $Id: key-bindings.c,v 1.24 2007-12-06 10:04:42 nicm Exp $ */
|
||||
/* $Id: key-bindings.c,v 1.25 2007-12-06 21:42:00 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -165,8 +165,7 @@ key_bindings_print(struct cmd_ctx *ctx, const char *fmt, ...)
|
||||
struct window *w = ctx->session->curw->window;
|
||||
va_list ap;
|
||||
|
||||
if (window_set_mode(w, &window_more_mode) != 0)
|
||||
return;
|
||||
window_set_mode(w, &window_more_mode);
|
||||
|
||||
va_start(ap, fmt);
|
||||
window_more_vadd(w, fmt, ap);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: window-more.c,v 1.7 2007-12-06 10:04:43 nicm Exp $ */
|
||||
/* $Id: window-more.c,v 1.8 2007-12-06 21:42:00 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -60,10 +60,7 @@ window_more_vadd(struct window *w, const char *fmt, va_list ap)
|
||||
xvasprintf(&msg, fmt, ap);
|
||||
ARRAY_ADD(&data->list, msg);
|
||||
|
||||
size = ARRAY_LENGTH(&data->list);
|
||||
if (size == 0)
|
||||
return;
|
||||
size--;
|
||||
size = ARRAY_LENGTH(&data->list) - 1;
|
||||
if (size >= data->top && size <= data->top + screen_last_y(s)) {
|
||||
screen_write_start_window(&ctx, w);
|
||||
window_more_write_line(w, &ctx, size - data->top);
|
||||
|
Loading…
Reference in New Issue
Block a user