]> gitweb.factorcode.org Git - factor.git/commitdiff
Messages tool fix
authorslava <slava@factorcode.org>
Sun, 24 Sep 2006 05:08:34 +0000 (05:08 +0000)
committerslava <slava@factorcode.org>
Sun, 24 Sep 2006 05:08:34 +0000 (05:08 +0000)
library/ui/tools/messages.factor

index d0f8bea2d64f5eb799e720cfaff749e8a8f4785d..06561fb3951fa4d6c43261d18a1bcf7c6debc7f8 100644 (file)
@@ -16,14 +16,19 @@ M: messages batch-begins
 M: messages compile-begins
     2drop ;
 
+: messages-errors+
+    dup messages-errors# 1+ swap set-messages-errors# ;
+
+: messages-warnings+
+    dup messages-warnings# 1+ swap set-messages-warnings# ;
+
 M: messages compile-error
-    over inference-error-major? [
-        dup messages-errors# 1+ over set-messages-errors#
-        messages-errors
-    ] [
-        dup messages-warnings# 1+ over set-messages-warnings#
-        messages-warnings
-    ] if [ error. ] with-stream ;
+    over inference-error?
+    [ over inference-error-major? ]
+    [ t ] if
+    [ dup messages-errors+ messages-errors ]
+    [ dup messages-warnings+ messages-warnings ] if
+    [ error. ] with-stream ;
 
 : <messages-button> ( -- gadget )
     "Compiler messages"