summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2023-04-26 00:37:27 +0200
committerSébastien Helleu <flashcode@flashtux.org>2023-04-26 00:47:02 +0200
commit8d430aa2ebfd1e44e5e7d78f2c1bdd93e42693d9 (patch)
tree1745fa4c84b5105b2503e502d0fea5aceea9716e /src
parentdf6dfcea11598f887b7e7f67fee8bd0f9740e51b (diff)
downloadweechat-8d430aa2ebfd1e44e5e7d78f2c1bdd93e42693d9.zip
core: fix display bug when drawing partially scrolled multiline
If you have a chat line with multiple lines that were scrolled so that part of it is rendered at the bottom of the chat area, and part of it falls below the chat area, there was a bug where the prefix_suffix would be displayed at the end of the last line. Looks like this happens because the gui_chat_display_prefix_suffix is called for the line below the last line displayed in the chat area. So we have to add a check for this so we don't add the prefix_suffix. This check is copied from gui_chat_display_word which checks for the same. Fixes #1912
Diffstat (limited to 'src')
-rw-r--r--src/gui/curses/gui-curses-chat.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/curses/gui-curses-chat.c b/src/gui/curses/gui-curses-chat.c
index d7dec68d8..915009d67 100644
--- a/src/gui/curses/gui-curses-chat.c
+++ b/src/gui/curses/gui-curses-chat.c
@@ -507,6 +507,9 @@ gui_chat_display_prefix_suffix (struct t_gui_window *window,
chars_displayed = 0;
+ if ((!simulate) && (window->win_chat_cursor_y >= window->win_chat_height))
+ return chars_displayed;
+
/* insert spaces for aligning text under time/nick */
length_align = gui_line_get_align (window->buffer, line, 0, 0);