From 34737f62e903d6e37325fe215751f7b6e0fdbd19 Mon Sep 17 00:00:00 2001
From: Vanessa Ezekowitz <vanessaezekowitz@gmail.com>
Date: Sat, 1 Sep 2012 17:42:42 -0400
Subject: oops, that last commit broke something - evidently 'code' is not
 consistent. This restores the previous behavior when code=nil, and shows the
 code when not.

---
 mesecons_microcontroller/init.lua | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/mesecons_microcontroller/init.lua b/mesecons_microcontroller/init.lua
index 24d98a1..3a2ce2b 100644
--- a/mesecons_microcontroller/init.lua
+++ b/mesecons_microcontroller/init.lua
@@ -426,7 +426,11 @@ function yc_command_after_execute(params)
 		if yc_parsecode(params.code, params.pos) == nil then
 			meta:set_string("infotext", "Code in after() not valid!")
 		else
-			meta:set_string("infotext", "Working Microcontroller\n"..code)
+			if code ~= nil then
+				meta:set_string("infotext", "Working Microcontroller\n"..code)
+			else
+				meta:set_string("infotext", "Working Microcontroller")
+			end
 		end
 	end
 end
-- 
cgit v1.2.3