diff options
Diffstat (limited to 'vchat-ui.c')
-rwxr-xr-x | vchat-ui.c | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -109,6 +109,8 @@ static int currentstamp = 0; | |||
109 | /* Prototype declarations */ | 109 | /* Prototype declarations */ |
110 | 110 | ||
111 | static void resize (int); | 111 | static void resize (int); |
112 | static void forceredraw (void); | ||
113 | static void forceredraw_wrapper (int a) {forceredraw();} | ||
112 | static void drawwin (WINDOW *win, struct sb_data *sb); | 114 | static void drawwin (WINDOW *win, struct sb_data *sb); |
113 | static int writescr (WINDOW *win, struct sb_entry *entry); | 115 | static int writescr (WINDOW *win, struct sb_entry *entry); |
114 | static int testfilter ( struct sb_entry *entry); | 116 | static int testfilter ( struct sb_entry *entry); |
@@ -767,12 +769,20 @@ void ttgtsz(int *x,int *y) { | |||
767 | } | 769 | } |
768 | 770 | ||
769 | static void | 771 | static void |
770 | redraw (void) | 772 | forceredraw (void) |
771 | { | 773 | { |
772 | sb_pub->scroll = sb_pub->count; | 774 | sb_pub->scroll = sb_pub->count; |
773 | sb_priv->scroll = sb_priv->count; | 775 | sb_priv->scroll = sb_priv->count; |
774 | 776 | ||
775 | resize(0); | 777 | resize(0); |
778 | if(console) wclear(console); | ||
779 | if(topic) wclear(topic); | ||
780 | if(private) wclear(private); | ||
781 | if(channel) wclear( channel ); | ||
782 | if(output) wclear(output); | ||
783 | if(input) wclear(input); | ||
784 | resize(0); | ||
785 | |||
776 | } | 786 | } |
777 | 787 | ||
778 | /* resize display on SIGWINCH | 788 | /* resize display on SIGWINCH |
@@ -1077,7 +1087,7 @@ initui (void) | |||
1077 | /* install signalhandler */ | 1087 | /* install signalhandler */ |
1078 | 1088 | ||
1079 | signal(SIGWINCH, resize); | 1089 | signal(SIGWINCH, resize); |
1080 | signal(SIGCONT, resize); | 1090 | signal(SIGCONT, forceredraw_wrapper); |
1081 | 1091 | ||
1082 | /* set options */ | 1092 | /* set options */ |
1083 | keypad (stdscr, TRUE); | 1093 | keypad (stdscr, TRUE); |
@@ -1212,7 +1222,7 @@ initui (void) | |||
1212 | /* bind CTRL-L to clearmsg() */ | 1222 | /* bind CTRL-L to clearmsg() */ |
1213 | rl_bind_key ('J'-'@', (rl_command_func_t *) clearpriv); | 1223 | rl_bind_key ('J'-'@', (rl_command_func_t *) clearpriv); |
1214 | rl_bind_key ('O'-'@', (rl_command_func_t *) clearchan); | 1224 | rl_bind_key ('O'-'@', (rl_command_func_t *) clearchan); |
1215 | rl_bind_key ('L'-'@', (rl_command_func_t *) redraw); | 1225 | rl_bind_key ('L'-'@', (rl_command_func_t *) forceredraw); |
1216 | rl_bind_key ('B'-'@', (rl_command_func_t *) scrollup); | 1226 | rl_bind_key ('B'-'@', (rl_command_func_t *) scrollup); |
1217 | rl_bind_key ('P'-'@', (rl_command_func_t *) scrollup); | 1227 | rl_bind_key ('P'-'@', (rl_command_func_t *) scrollup); |
1218 | rl_bind_key ('F'-'@', (rl_command_func_t *) scrolldown); | 1228 | rl_bind_key ('F'-'@', (rl_command_func_t *) scrolldown); |