     
     // MARK: Private Properties
     
-    private var totalNumberOfLines = 0
-    private var needsRecountTotalNumberOfLines = true
+    private var requiredNumberOfDigits = 0
+    private var needsRecountNumberOfDigits = true
     
     private weak var draggingTimer: Timer?
     

    /// update total number of lines determining view thickness on holizontal text layout
    @objc private func textDidChange(_ notification: Notification) {
        
        self.needsRecountTotalNumberOfLines = true
    }
    
}

        }
        
        // get glyph range of which line number should be drawn
        let glyphRangeToDraw = layoutManager.glyphRange(forBoundingRectWithoutAdditionalLayout: textView.visibleRect, in: textContainer)
        
        // count up lines until visible
        let firstVisibleIndex = layoutManager.characterIndexForGlyph(at: glyphRangeToDraw.location)
        var lineNumber = string.lineNumber(at: firstVisibleIndex)
        
        // draw visible line numbers
        var glyphIndex = glyphRangeToDraw.location
        var lastLineNumber = 0
        
