Use the full chat pane width for the topic divider
This commit is contained in:
parent
4bf001e7cd
commit
6ed9931044
2 changed files with 11 additions and 16 deletions
|
|
@ -112,7 +112,7 @@ Build yours by copying `irc9rc-example` to `irc9rc` next to the binary (or to
|
|||
[irc9] irc.example / #general
|
||||
/----------------------\----------------------------------------
|
||||
|* irc.example | Topic: General discussion
|
||||
| | ---------------------------------------
|
||||
| |----------------------------------------
|
||||
| |-#general |
|
||||
| |-#help(3) |
|
||||
| \-alice | [10:21] <alice> hello there
|
||||
|
|
|
|||
25
irc9.c
25
irc9.c
|
|
@ -2553,6 +2553,15 @@ static void draw_title(void)
|
|||
fputs("\033[0m", stdout);
|
||||
}
|
||||
|
||||
static void draw_pane_divider(int row)
|
||||
{
|
||||
int left = lines > 5 && treew >= 2 ? treew : 0;
|
||||
terminal_move(row, left);
|
||||
terminal_accent();
|
||||
terminal_repeat('-', cols - left);
|
||||
fputs("\033[0m", stdout);
|
||||
}
|
||||
|
||||
/* Include the topic divider when calculating the chat pane height. */
|
||||
static int layout_topic(int draw)
|
||||
{
|
||||
|
|
@ -2576,12 +2585,7 @@ static int layout_topic(int draw)
|
|||
if (draw && row < height) draw_irc_text(chat_top + row, left, text, width);
|
||||
free(text);
|
||||
}
|
||||
if (draw && divider) {
|
||||
terminal_move(chat_top + height, left);
|
||||
terminal_accent();
|
||||
terminal_repeat('-', width);
|
||||
fputs("\033[0m", stdout);
|
||||
}
|
||||
if (draw && divider) draw_pane_divider(chat_top + height);
|
||||
return height + divider;
|
||||
}
|
||||
|
||||
|
|
@ -2622,15 +2626,6 @@ static void draw_main(void)
|
|||
}
|
||||
}
|
||||
|
||||
static void draw_pane_divider(int row)
|
||||
{
|
||||
int left = lines > 5 && treew >= 2 ? treew : 0;
|
||||
terminal_move(row, left);
|
||||
terminal_accent();
|
||||
terminal_repeat('-', cols - left);
|
||||
fputs("\033[0m", stdout);
|
||||
}
|
||||
|
||||
static void draw_status(void)
|
||||
{
|
||||
status_minute = time(NULL) / 60;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue