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