mirror of
https://github.com/profanity-im/profanity.git
synced 2025-07-26 12:14:28 -04:00
Added win_page_off
This commit is contained in:
parent
acf1afe025
commit
2d534fb278
@ -744,18 +744,8 @@ void
|
|||||||
ui_current_page_off(void)
|
ui_current_page_off(void)
|
||||||
{
|
{
|
||||||
ProfWin *current = wins_get_current();
|
ProfWin *current = wins_get_current();
|
||||||
current->paged = 0;
|
win_page_off(current);
|
||||||
|
win_refresh(current);
|
||||||
int rows = getmaxy(stdscr);
|
|
||||||
int y = getcury(current->win);
|
|
||||||
int size = rows - 3;
|
|
||||||
|
|
||||||
current->y_pos = y - (size - 1);
|
|
||||||
if (current->y_pos < 0) {
|
|
||||||
current->y_pos = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
wins_refresh_current();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -132,6 +132,21 @@ win_refresh(ProfWin *window)
|
|||||||
prefresh(window->win, window->y_pos, 0, 1, 0, rows-3, cols-1);
|
prefresh(window->win, window->y_pos, 0, 1, 0, rows-3, cols-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
win_page_off(ProfWin *window)
|
||||||
|
{
|
||||||
|
window->paged = 0;
|
||||||
|
|
||||||
|
int rows = getmaxy(stdscr);
|
||||||
|
int y = getcury(window->win);
|
||||||
|
int size = rows - 3;
|
||||||
|
|
||||||
|
window->y_pos = y - (size - 1);
|
||||||
|
if (window->y_pos < 0) {
|
||||||
|
window->y_pos = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
win_presence_colour_on(ProfWin *window, const char * const presence)
|
win_presence_colour_on(ProfWin *window, const char * const presence)
|
||||||
{
|
{
|
||||||
|
@ -63,6 +63,7 @@ void win_free(ProfWin *window);
|
|||||||
void win_print_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, ...);
|
const char * const msg, ...);
|
||||||
void win_refresh(ProfWin *window);
|
void win_refresh(ProfWin *window);
|
||||||
|
void win_page_off(ProfWin *window);
|
||||||
void win_print_time(ProfWin *window, char show_char);
|
void win_print_time(ProfWin *window, char show_char);
|
||||||
void win_presence_colour_on(ProfWin *window, const char * const presence);
|
void win_presence_colour_on(ProfWin *window, const char * const presence);
|
||||||
void win_presence_colour_off(ProfWin *window, const char * const presence);
|
void win_presence_colour_off(ProfWin *window, const char * const presence);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user