Index: cmd.c
===================================================================
--- cmd.c	(revision 8d4b521bc5864ca28d5d575dc461859580d4cf28)
+++ cmd.c	(revision 385fda9097ab29cf4e27521044d9ef69107110c0)
@@ -89,5 +89,5 @@
   if (argc < 0) {
     owl_free(tmpbuff);
-    sepbar(NULL);
+    sepbar_dirty();
     owl_function_makemsg("Unbalanced quotes");
     return NULL;
@@ -104,5 +104,5 @@
   owl_parse_delete(argv, argc);
   owl_free(tmpbuff);
-  sepbar(NULL);
+  sepbar_dirty();
   return retval;
 }
Index: functions.c
===================================================================
--- functions.c	(revision d70f45f696c36079cd7f4d0487301f33cbd5e8bc)
+++ functions.c	(revision 385fda9097ab29cf4e27521044d9ef69107110c0)
@@ -1248,20 +1248,9 @@
 }
 
-void owl_function_set_cursor(WINDOW *win)
-{
-  /* Be careful that this window is actually empty, otherwise panels get confused */
-  if (is_wintouched(win)) {
-    owl_function_debugmsg("Warning: owl_function_set_cursor called on dirty window");
-    update_panels();
-  }
-  wnoutrefresh(win);
-}
-
 void owl_function_full_redisplay(void)
 {
   touchwin(owl_global_get_curs_recwin(&g));
-  touchwin(owl_global_get_curs_sepwin(&g));
-
-  sepbar("");
+
+  sepbar_dirty();
 
   owl_global_set_needrefresh(&g);
Index: global.c
===================================================================
--- global.c	(revision 5b80b8793a3d07ccd349cd2e447d6d6ba8ffea24)
+++ global.c	(revision 385fda9097ab29cf4e27521044d9ef69107110c0)
@@ -98,4 +98,5 @@
   owl_popwin_init(&(g->pw));
   owl_msgwin_init(&(g->msgwin), g->mainpanel.msgwin);
+  g_signal_connect(g->mainpanel.sepwin, "redraw", G_CALLBACK(sepbar_redraw), NULL);
 
   g->aim_screenname=NULL;
@@ -293,6 +294,6 @@
 }
 
-WINDOW *owl_global_get_curs_sepwin(const owl_global *g) {
-  return panel_window(g->seppan);
+owl_window *owl_global_get_curs_sepwin(const owl_global *g) {
+  return g->mainpanel.sepwin;
 }
 
@@ -367,5 +368,4 @@
                           style,
                           hist);
-  owl_window_set_cursor(owl_global_get_curs_typwin(g));
   return g->tw;
 }
@@ -381,5 +381,4 @@
   }
   owl_window_dirty(owl_global_get_curs_typwin(g));
-  /* owl_window_set_cursor(owl_global_get_curs_sepwin(g)); */
 
   g->tw = NULL;
@@ -521,5 +520,5 @@
   /* refresh stuff */
   owl_mainwin_redisplay(&(g->mw));
-  sepbar(NULL);
+  sepbar_dirty();
 
   owl_function_full_redisplay();
Index: owl.c
===================================================================
--- owl.c	(revision f6fae8d526ff0525c526bc767e88c386fde4f41b)
+++ owl.c	(revision 385fda9097ab29cf4e27521044d9ef69107110c0)
@@ -302,5 +302,5 @@
     /* this should be optimized to not run if the new messages won't be displayed */
     owl_mainwin_redisplay(owl_global_get_mainwin(&g));
-    sepbar(NULL);
+    sepbar_dirty();
   }
   return newmsgs;
@@ -464,16 +464,15 @@
   if (owl_global_is_needrefresh(&g)) {
     /* Redraw the screen */
-    owl_window_redraw_scheduled();
-
-    /* these are here in case a relayout changes the windows */
-    WINDOW *sepwin = owl_global_get_curs_sepwin(&g);
-
-    /* move the cursor to unmanaged window if necessary */
+
+    /* HACK: move the cursor to unmanaged window if necessary; these should be
+     * associated with the context or something. */
     if (!owl_popwin_is_active(owl_global_get_popwin(&g))
 	&& owl_global_get_typwin(&g)) {
-      /* owl_function_set_cursor(typwin); */
+      owl_window_set_cursor(owl_global_get_curs_typwin(&g));
     } else {
-      owl_function_set_cursor(sepwin);
-    }
+      owl_window_set_cursor(owl_global_get_curs_sepwin(&g));
+    }
+
+    owl_window_redraw_scheduled();
     doupdate();
     owl_global_set_noneedrefresh(&g);
@@ -594,5 +593,4 @@
     "-----------------------------------------------------------------m-m---\n"
   );
-  sepbar(NULL);
 
   /* process the startup file */
Index: util.c
===================================================================
--- util.c	(revision 05ca0d8685143d49b9e1c7d2949a55f6976c27ff)
+++ util.c	(revision 385fda9097ab29cf4e27521044d9ef69107110c0)
@@ -10,7 +10,11 @@
 #include <glib-object.h>
 
-void sepbar(const char *in)
-{
-  WINDOW *sepwin;
+void sepbar_dirty(void)
+{
+  owl_window_dirty(owl_global_get_curs_sepwin(&g));
+}
+
+void sepbar_redraw(owl_window *w, WINDOW *sepwin, void *user_data)
+{
   const owl_messagelist *ml;
   const owl_view *v;
@@ -18,5 +22,4 @@
   const char *foo, *appendtosepbar;
 
-  sepwin=owl_global_get_curs_sepwin(&g);
   ml=owl_global_get_msglist(&g);
   v=owl_global_get_current_view(&g);
@@ -101,10 +104,4 @@
     wattroff(sepwin, A_BOLD);
   }
-  
-  if (in) {
-    getyx(sepwin, y, x);
-    wmove(sepwin, y, x+2);
-    waddstr(sepwin, in);
-  }
 
   appendtosepbar = owl_global_get_appendtosepbar(&g);
@@ -122,5 +119,4 @@
   wattroff(sepwin, A_BOLD);
   wattroff(sepwin, A_REVERSE);
-  owl_global_set_needrefresh(&g);
 }
 
