Trigger Processcaption event only for caption & hstatus handling.
authorGuo Rui <firemeteor@Adam.(none)>
Wed, 8 Jul 2009 14:51:46 +0000 (8 22:51 +0800)
committerGuo Rui <firemeteor@Adam.(none)>
Wed, 8 Jul 2009 14:51:46 +0000 (8 22:51 +0800)
src/screen.c

index 43d6259..40b69e6 100644 (file)
@@ -2539,10 +2539,10 @@ int rec;
 
   *p = '\0';
 #ifdef SCRIPT
-  /* FIXME: Need a way to pass result back.
-   * Also, should it be specific to caption or to hstatus? */
-  if (trigger_sevent(&globalevents.processcaption, display))
-    return winmsg_buf;
+  /* FIXME: Need a way to pass result back.*/
+  if (str == hstatusstring || str == captionstring)
+    if (trigger_sevent(&globalevents.processcaption, display, str == hstatusstring))
+      return winmsg_buf;
 #endif
   if (!display)
     return winmsg_buf;