         }
     }
     
+    var containsSubscopeWithEditedIndexSet: Bool {
+        for scope in subscopes {
+            if scope.editedIndexSet {
+                return true
+            }
+        }
+        return false
+    }
+    
     // Printable
     override var description: String {
     return "JLScope"

    // Will set the color to .Text in this scope's parentIndexSet before performing.
    var clearWithTextColorBeforePerform = false
    
    // Store the result-indexSet until next perform to calculate deltas
    // This may not be a good idea, and JLScope's use of this property is different, JLToken should
    // probably conform to a protocol instead of subclass JLScope, but it's inconvenient at the same time
    var indexSet: NSMutableIndexSet = NSMutableIndexSet() {
    didSet  {
        let (additions, deletions) = NSIndexSetDelta(oldValue, indexSet)
    }
    }
    var subscopes = [JLScope]()
    
    func addSubscope(subscope: JLScope) {

                    var newSet = scope.indexSet
                    indexSet -= newSet
                    deletions += NSIndexSetDelta(oldSet, newSet).deletions
                }
            } else {
                scope.perform(attributedString, parentIndexSet: indexSet)
