                 objectLine = textSplits[textSplits.count - 1]
             }
             
-            let objectLineRange = NSRange(location: 0, length: objectLine.characters.count)
+            let objectLineRange = NSRange(location: 0, length: NSString(string: objectLine).length)
             
             // Check matches.
             let unorderedListMatches = NCKTextUtil.markdownUnorderedListRegularExpression.matchesInString(objectLine, options: [], range: objectLineRange)

    }
    
    override func replaceCharactersInRange(range: NSRange, withString str: String) {
        var listItemFillText: String = ""
        var currentNumber: Int?
        
        // Unordered and Ordered list auto-complete support

//                // Reorder numbers after current line.
//                var afterStrings = textView.text.substringFromIndex(textView.text.startIndex.advancedBy(textView.selectedRange.location))
//                
//                let orderedListAfterItemsMatches = NCKTextUtil.markdownOrderedListAfterItemsRegularExpression.matchesInString(afterStrings, options: [], range: NSRange(location: 0, length: NSString(string: afterStrings).length))
//                
//                for orderedListAfterItem in orderedListAfterItemsMatches {
//                    currentNumber! += 1
