mirror of
https://github.com/Tha14/toxic.git
synced 2024-12-22 16:53:24 +01:00
make ctrl-L force refresh the window
This commit is contained in:
parent
b46a77f977
commit
e7697b8fba
Binary file not shown.
@ -262,9 +262,7 @@ void cmd_avatar(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)[
|
||||
void cmd_clear(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)[MAX_STR_SIZE])
|
||||
{
|
||||
line_info_clear(self->chatwin->hst);
|
||||
wclear(window);
|
||||
endwin();
|
||||
refresh();
|
||||
force_refresh(window);
|
||||
}
|
||||
|
||||
void cmd_connect(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)[MAX_STR_SIZE])
|
||||
|
@ -236,6 +236,10 @@ bool input_handle(ToxWindow *self, wint_t key, int x, int y, int mx_x, int mx_y)
|
||||
input_history(self, key, mx_x);
|
||||
break;
|
||||
|
||||
case T_KEY_C_L:
|
||||
force_refresh(self->chatwin->history);
|
||||
break;
|
||||
|
||||
default:
|
||||
match = false;
|
||||
break;
|
||||
|
@ -62,6 +62,7 @@
|
||||
#define T_KEY_C_F 0x06 /* ctrl-f */
|
||||
#define T_KEY_C_H 0x08 /* ctrl-h */
|
||||
#define T_KEY_C_Y 0x19 /* ctrl-y */
|
||||
#define T_KEY_C_L 0x0C /* ctrl-l */
|
||||
#define T_KEY_TAB 0x09 /* TAB key */
|
||||
|
||||
#define ONLINE_CHAR "*"
|
||||
|
@ -496,6 +496,13 @@ ToxWindow *get_window_ptr(int i)
|
||||
return toxwin;
|
||||
}
|
||||
|
||||
void force_refresh(WINDOW *w)
|
||||
{
|
||||
wclear(w);
|
||||
endwin();
|
||||
refresh();
|
||||
}
|
||||
|
||||
int get_num_active_windows(void)
|
||||
{
|
||||
return num_active_windows;
|
||||
|
@ -242,6 +242,7 @@ void set_active_window(int ch);
|
||||
int get_num_active_windows(void);
|
||||
void kill_all_windows(Tox *m); /* should only be called on shutdown */
|
||||
void on_window_resize(void);
|
||||
void force_refresh(WINDOW *w);
|
||||
ToxWindow *get_window_ptr(int i);
|
||||
|
||||
/* refresh inactive windows to prevent scrolling bugs.
|
||||
|
Loading…
Reference in New Issue
Block a user