Fix a bug reported by pedzsan when importing snippets from https://github.com/pivotal/jasmine-tmbundle

This commit is contained in:
capitaomorte 2011-05-18 23:11:12 +00:00
parent 49a9d85d10
commit 0d00c707e9

View File

@ -100,13 +100,13 @@ class TmSubmenu
first = true; first = true;
string = "" string = ""
separator_useless = true; separator_useless = true;
items.each do |uuid| items.each do |uuid|
if deleteditems.index(uuid) if deleteditems && deleteditems.index(uuid)
$stderr.puts "#{uuid} has been deleted!" $stderr.puts "#{uuid} has been deleted!"
next next
end end
string += "\n" string += "\n"
string += " " * indent string += " " * indent
string += (first ? thingy[0] : (" " * thingy[0].length)) string += (first ? thingy[0] : (" " * thingy[0].length))
@ -151,7 +151,7 @@ class TmSubmenu
all[k] = TmSubmenu.new(v["name"], v) all[k] = TmSubmenu.new(v["name"], v)
end end
excluded = mainmenu["excludedItems"] + TmSubmenu::excluded_items excluded = (mainmenu["excludedItems"] || []) + TmSubmenu::excluded_items
closing = "\n '(" closing = "\n '("
closing+= excluded.collect do |uuid| closing+= excluded.collect do |uuid|
"\"" + uuid + "\"" "\"" + uuid + "\""