Retain sign text when editing is aborted by <esc>
authorZefram <zefram@fysh.org>
Sun, 20 Jul 2014 16:22:54 +0000 (17:22 +0100)
committersfan5 <sfan5@live.de>
Tue, 22 Jul 2014 11:00:20 +0000 (13:00 +0200)
mods/default/nodes.lua

index 93d6981c59fb54dcaa1dd27dac84c926c52a30a3..354096e04701c64db1ecf1545207f147a36512f9 100644 (file)
@@ -723,7 +723,7 @@ minetest.register_node("default:sign_wall", {
                        return
                end
                local meta = minetest.get_meta(pos)
-               fields.text = fields.text or ""
+               if not fields.text then return end
                minetest.log("action", (sender:get_player_name() or "").." wrote \""..fields.text..
                                "\" to sign at "..minetest.pos_to_string(pos))
                meta:set_string("text", fields.text)