         guard !indentRange.isEmpty else { return 0 }
         
         let indent = self[workaround: indentRange]
-        let numberOfTabs = indent.components(separatedBy: "\t").count - 1
+        let numberOfTabs = indent.count { $0 == "\t" }
         
         return numberOfTabs + ((indent.count - numberOfTabs) / tabWidth)
     }

        
        guard range.isEmpty else { return nil }
        
        let lineRange = (self as NSString).lineRange(at: range.location)
        let forwardRange = NSRange(lineRange.location..<range.location)
        guard (self as NSString).range(of: "^ +$", options: .regularExpression, range: forwardRange).length > 1 else { return nil }
        
        let column = self.column(of: range.location, tabWidth: tabWidth)
        let targetLength = tabWidth - (column % tabWidth)
        let targetRange = NSRange((range.location - targetLength)..<range.location)
        
        guard
            range.location >= targetLength,

//
//  ---------------------------------------------------------------------------
//
//  © 2015-2020 1024jp
//
//  Licensed under the Apache License, Version 2.0 (the "License");
//  you may not use this file except in compliance with the License.
