mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
Do not scroll to end in message window when paging
This commit is contained in:
parent
3d768527c1
commit
3fdd9944ab
@ -298,7 +298,11 @@ _ui_incoming_msg(const char * const from, const char * const message,
|
||||
|
||||
free(display_from);
|
||||
|
||||
ui_current_page_off();
|
||||
ProfWin *current = wins_get_current();
|
||||
if (!current->paged) {
|
||||
win_move_to_end(current);
|
||||
win_refresh(current);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
@ -858,7 +862,7 @@ static void
|
||||
_ui_current_page_off(void)
|
||||
{
|
||||
ProfWin *current = wins_get_current();
|
||||
win_page_off(current);
|
||||
win_move_to_end(current);
|
||||
win_refresh(current);
|
||||
}
|
||||
|
||||
@ -1663,6 +1667,11 @@ _win_handle_page(const wint_t * const ch)
|
||||
current->paged = 1;
|
||||
wins_refresh_current();
|
||||
}
|
||||
|
||||
// switch off page if last line visible
|
||||
if ((y-1) - *page_start == page_space) {
|
||||
current->paged = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -114,7 +114,7 @@ win_refresh(ProfWin *window)
|
||||
}
|
||||
|
||||
void
|
||||
win_page_off(ProfWin *window)
|
||||
win_move_to_end(ProfWin *window)
|
||||
{
|
||||
window->paged = 0;
|
||||
|
||||
|
@ -63,7 +63,7 @@ void win_vprint_line(ProfWin *self, const char show_char, int attrs,
|
||||
void win_print_line(ProfWin *self, const char show_char, int attrs,
|
||||
const char * const msg);
|
||||
void win_refresh(ProfWin *window);
|
||||
void win_page_off(ProfWin *window);
|
||||
void win_move_to_end(ProfWin *window);
|
||||
void win_print_time(ProfWin *window, char show_char);
|
||||
void win_presence_colour_on(ProfWin *window, const char * const presence);
|
||||
void win_presence_colour_off(ProfWin *window, const char * const presence);
|
||||
|
Loading…
Reference in New Issue
Block a user