<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -515,6 +515,8 @@ def get_item_for_range(context, range):
 def get_item_parent_for_range(context, range):
     '''Returns the parent of the item containing the given range'''
     item = get_item_for_range(context, range)
+    if item is None:
+        return None
     new_range = item.range()
     # Select the parent if the range is the same
     while(item.parent() and (new_range.location == range.location and \</diff>
      <filename>src/Contents/Resources/tea_actions.py</filename>
    </modified>
    <modified>
      <diff>@@ -83,8 +83,14 @@ def act(context, direction='out', mode='auto'):
                         new_range = items[0].range()
                 targets.append(new_range)
             else:
-                targets.append(tea.get_item_parent_for_range(context, range).range())
+                item = tea.get_item_parent_for_range(context, range)
+                if item is None:
+                    continue
+                targets.append(item.range())
         
         # Set the selections, and return
-        context.setSelectedRanges_([NSValue.valueWithRange_(range) for range in targets])
-        return True
+        if len(targets) &gt; 0:
+            context.setSelectedRanges_([NSValue.valueWithRange_(range) for range in targets])
+            return True
+        else:
+            return False</diff>
      <filename>src/Support/Scripts/balance.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>3b0844c9ac7638599366dda6efee65af8d5aad3d</id>
    </parent>
  </parents>
  <author>
    <name>Ian Beck</name>
    <email>ian@onecrayon.com</email>
  </author>
  <url>http://github.com/onecrayon/tea-for-espresso/commit/f9a01f211a4825805c185c2470382290f7f240d3</url>
  <id>f9a01f211a4825805c185c2470382290f7f240d3</id>
  <committed-date>2009-10-25T10:08:08-07:00</committed-date>
  <authored-date>2009-10-25T10:08:08-07:00</authored-date>
  <message>1.0.2 addendum: fixed a couple oversights for dealing with files without a language</message>
  <tree>56e1086e5aacfecdb5fadb3a340c11ba15bfd393</tree>
  <committer>
    <name>Ian Beck</name>
    <email>ian@onecrayon.com</email>
  </committer>
</commit>
