changeset 179:8c493b5671bd

Add separate updateWindows() function.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 15 Nov 2010 08:36:45 +0200
parents da4dbe82a4ed
children 2ada8d065bca
files nnchat.c
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/nnchat.c	Mon Nov 15 08:30:40 2010 +0200
+++ b/nnchat.c	Mon Nov 15 08:36:45 2010 +0200
@@ -710,6 +710,12 @@
 
 /*
 Different tab completion scenarios:
+void updateWindows(void)
+{
+    if (mainWin) redrawwin(mainWin);
+    if (statusWin) redrawwin(statusWin);
+    if (editWin) redrawwin(editWin);
+}
 
 Line start
 "foo<tab>" ->
@@ -1194,9 +1200,7 @@
                 break;
             
             case 0x0c: /* Ctrl + L */
-                redrawwin(mainWin);
-                redrawwin(statusWin);
-                redrawwin(editWin);
+                updateWindows();
                 break;
 
             case KEY_NPAGE: