diff options
Diffstat (limited to 'degesch.c')
-rw-r--r-- | degesch.c | 19 |
1 files changed, 14 insertions, 5 deletions
@@ -1291,13 +1291,22 @@ refresh_prompt (struct app_context *ctx) str_append_printf (&prompt, "(%s) ", unseen_prefix); free (unseen_prefix); - str_append (&prompt, buffer->name); - if (buffer->type == BUFFER_CHANNEL) + int buffer_index = 1; + for (struct buffer *iter = ctx->buffers; + iter && iter != buffer; iter = iter->next) + buffer_index++; + + str_append_printf (&prompt, "%d:%s", buffer_index, buffer->name); + if (buffer->type == BUFFER_CHANNEL && *buffer->mode) str_append_printf (&prompt, "(%s)", buffer->mode); - str_append_c (&prompt, ' '); - str_append (&prompt, ctx->irc_nickname); - str_append_printf (&prompt, "(%s)", ctx->irc_user_mode); + if (buffer != ctx->global_buffer) + { + str_append_c (&prompt, ' '); + str_append (&prompt, ctx->irc_nickname); + if (*ctx->irc_user_mode) + str_append_printf (&prompt, "(%s)", ctx->irc_user_mode); + } str_append_c (&prompt, ']'); } |