mirror of
https://github.com/Tha14/toxic.git
synced 2025-07-04 13:36:45 +02:00
put help message in chatwindow box when in scroll mode
This commit is contained in:
27
src/chat.c
27
src/chat.c
@ -688,20 +688,23 @@ static void chat_onDraw(ToxWindow *self, Tox *m)
|
||||
|
||||
ChatContext *ctx = self->chatwin;
|
||||
|
||||
if (!ctx->hst->scroll_mode)
|
||||
line_info_print(self);
|
||||
wclear(ctx->linewin);
|
||||
|
||||
if (ctx->hst->scroll_mode) {
|
||||
line_info_onDraw(self);
|
||||
} else {
|
||||
curs_set(1);
|
||||
|
||||
wclear(ctx->linewin);
|
||||
line_info_print(self);
|
||||
|
||||
if (ctx->len > 0) {
|
||||
uint8_t line[MAX_STR_SIZE];
|
||||
|
||||
if (wcs_to_mbs_buf(line, ctx->line, MAX_STR_SIZE) == -1) {
|
||||
reset_buf(ctx->line, &ctx->pos, &ctx->len);
|
||||
wmove(self->window, y2 - CURS_Y_OFFSET, 0);
|
||||
} else {
|
||||
mvwprintw(ctx->linewin, 1, 0, "%s", line);
|
||||
if (ctx->len > 0 && !ctx->hst->scroll_mode) {
|
||||
uint8_t line[MAX_STR_SIZE];
|
||||
|
||||
if (wcs_to_mbs_buf(line, ctx->line, MAX_STR_SIZE) == -1) {
|
||||
reset_buf(ctx->line, &ctx->pos, &ctx->len);
|
||||
wmove(self->window, y2 - CURS_Y_OFFSET, 0);
|
||||
} else {
|
||||
mvwprintw(ctx->linewin, 1, 0, "%s", line);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user