]> gitweb.factorcode.org Git - factor.git/commitdiff
listener: don't crash if we forget the current vocab. Fixes #259.
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 18 Oct 2011 23:46:55 +0000 (16:46 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 18 Oct 2011 23:46:55 +0000 (16:46 -0700)
basis/listener/listener.factor

index 71b1457725e12592e562c68cccd617ace0fc2428..ea70a4ca46a816d01f5e22d09ebab969c24a06f8 100644 (file)
@@ -12,8 +12,8 @@ GENERIC: stream-read-quot ( stream -- quot/f )
 GENERIC# prompt. 1 ( stream prompt -- )
 
 : prompt ( -- str )
-    current-vocab name>> auto-use? get [ " - auto" append ] when
-    "( " " )" surround ;
+    manifest get current-vocab>> [ name>> ] [ "" ] if*
+    auto-use? get [ " - auto" append ] when "( " " )" surround ;
 
 M: object prompt.
     nip H{ { background T{ rgba f 1 0.7 0.7 1 } } } format bl