summaryrefslogtreecommitdiff
path: root/vchat-ui.c
diff options
context:
space:
mode:
authorerdgeist <>2004-06-03 22:54:10 +0000
committererdgeist <>2004-06-03 22:54:10 +0000
commit8a245338ad64ed8628e03b577d01aadc89bb5753 (patch)
tree1bc6c06c1594ac68046da6b9b0a714f7148e95cb /vchat-ui.c
parent4dc5ab5db53e9d81cf92b182ac98338ecd174513 (diff)
Resize tidied up
Diffstat (limited to 'vchat-ui.c')
-rwxr-xr-xvchat-ui.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/vchat-ui.c b/vchat-ui.c
index e846eb8..7a2e6ad 100755
--- a/vchat-ui.c
+++ b/vchat-ui.c
@@ -109,6 +109,8 @@ static int currentstamp = 0;
109/* Prototype declarations */ 109/* Prototype declarations */
110 110
111static void resize (int); 111static void resize (int);
112static void forceredraw (void);
113static void forceredraw_wrapper (int a) {forceredraw();}
112static void drawwin (WINDOW *win, struct sb_data *sb); 114static void drawwin (WINDOW *win, struct sb_data *sb);
113static int writescr (WINDOW *win, struct sb_entry *entry); 115static int writescr (WINDOW *win, struct sb_entry *entry);
114static int testfilter ( struct sb_entry *entry); 116static int testfilter ( struct sb_entry *entry);
@@ -767,12 +769,20 @@ void ttgtsz(int *x,int *y) {
767 } 769 }
768 770
769static void 771static void
770redraw (void) 772forceredraw (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);