diff options
author | Michael Vetter <jubalh@iodoru.org> | 2021-06-08 20:34:24 +0200 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2021-06-08 20:34:24 +0200 |
commit | f20f629bb4e07241a5095fb86960ae6b646ff7c7 (patch) | |
tree | 1309be2070b54b34f56690c34fd4a634ab60ad52 /src/ui | |
parent | 6bc440c6f7e8c2c40d2d45f5c0decc15821abc8b (diff) | |
download | profani-tty-f20f629bb4e07241a5095fb86960ae6b646ff7c7.tar.gz |
Fix multiple mentions in one line
`jubalh: jubalh jubalh` resulted in `20:32:34 - testuser1: jubalh20:32:34 - testuser1: : jubalh20:32:34 - testuser1: jubalh` Print date/nick only once at beginning of line.
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/mucwin.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index 54db7a38..54778acb 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -396,7 +396,10 @@ _mucwin_print_mention(ProfWin* window, const char* const message, const char* co win_append_highlight(window, THEME_ROOMMENTION, "*%s ", from); win_append_highlight(window, THEME_ROOMMENTION, "%s", before_str + 4); } else { - win_print_them(window, THEME_ROOMMENTION, ch, flags, from); + // print time and nick only once at beginning of the line + if (last_pos == 0) { + win_print_them(window, THEME_ROOMMENTION, ch, flags, from); + } win_append_highlight(window, THEME_ROOMMENTION, "%s", before_str); } g_free(before_str); |