mirror of
https://github.com/tmux/tmux.git
synced 2025-12-21 06:46:08 +00:00
Place cursor on correct line if message-line is not 0, reported by
Alexis Hildebrandt.
This commit is contained in:
13
status.c
13
status.c
@@ -264,14 +264,19 @@ status_line_size(struct client *c)
|
||||
}
|
||||
|
||||
/* Get the prompt line number for client's session. 1 means at the bottom. */
|
||||
static u_int
|
||||
u_int
|
||||
status_prompt_line_at(struct client *c)
|
||||
{
|
||||
struct session *s = c->session;
|
||||
u_int line, lines;
|
||||
|
||||
if (c->flags & (CLIENT_STATUSOFF|CLIENT_CONTROL))
|
||||
return (1);
|
||||
return (options_get_number(s->options, "message-line"));
|
||||
lines = status_line_size(c);
|
||||
if (lines == 0)
|
||||
return (0);
|
||||
line = options_get_number(s->options, "message-line");
|
||||
if (line >= lines)
|
||||
return (lines - 1);
|
||||
return (line);
|
||||
}
|
||||
|
||||
/* Get window at window list position. */
|
||||
|
||||
Reference in New Issue
Block a user