Comments and formatting updates
All checks were successful
CI API Docs / Test Python API Documentation Generation (pull_request) Successful in 34s
CI Code / Check coding style (pull_request) Successful in 34s
CI Code / Check spelling (pull_request) Successful in 30s
CI API Docs / Test C API Documentation Generation (pull_request) Successful in 1m12s
CI Code / Linux (arch) (pull_request) Successful in 11m59s
CI Code / Linux (ubuntu) (pull_request) Successful in 13m47s
CI Code / Linux (debian) (pull_request) Successful in 16m13s
All checks were successful
CI API Docs / Test Python API Documentation Generation (pull_request) Successful in 34s
CI Code / Check coding style (pull_request) Successful in 34s
CI Code / Check spelling (pull_request) Successful in 30s
CI API Docs / Test C API Documentation Generation (pull_request) Successful in 1m12s
CI Code / Linux (arch) (pull_request) Successful in 11m59s
CI Code / Linux (ubuntu) (pull_request) Successful in 13m47s
CI Code / Linux (debian) (pull_request) Successful in 16m13s
This commit is contained in:
@@ -701,11 +701,11 @@ void
|
||||
win_page_down(ProfWin* window, int scroll_size)
|
||||
{
|
||||
int total_rows = getcury(window->layout->win);
|
||||
int total_rows_with_unreaded = total_rows + window->layout->unread_msg;
|
||||
int total_rows_with_unread = total_rows + window->layout->unread_msg;
|
||||
int* page_start = &(window->layout->y_pos);
|
||||
int page_space = getmaxy(stdscr) - 4;
|
||||
int page_start_initial = *page_start;
|
||||
|
||||
|
||||
if (scroll_size == 0)
|
||||
scroll_size = page_space;
|
||||
win_scroll_state_t* scroll_state = &window->scroll_state;
|
||||
@@ -714,8 +714,8 @@ win_page_down(ProfWin* window, int scroll_size)
|
||||
*page_start += scroll_size;
|
||||
|
||||
// Scrolled down after reaching the bottom of the page
|
||||
gboolean past_bottom = *page_start > total_rows_with_unreaded - page_space;
|
||||
gboolean at_page_space_and_past_unread = (*page_start == page_space && *page_start >= total_rows_with_unreaded);
|
||||
gboolean past_bottom = *page_start > total_rows_with_unread - page_space;
|
||||
gboolean at_page_space_and_past_unread = (*page_start == page_space && *page_start >= total_rows_with_unread);
|
||||
gboolean is_chat = window->type == WIN_CHAT;
|
||||
|
||||
if ((past_bottom || at_page_space_and_past_unread) && is_chat) {
|
||||
|
||||
Reference in New Issue
Block a user