def check_editing_area(self):
        """Trigger adjustment of editing area if needed.

        That is, if the number of characters needed to blit
        the highest line number increases or decreases,
        adjust width and left position of the editing area
        to compensate for the space gained or taken.
        """
        ### calculate the maximum number of characters
        ### needed to blit the number of a line

        n_of_lines = len(self.lines)
        max_char_needed = len(str(n_of_lines))

        ### the max_char_needed variable contains what we
        ### consider to be the new value of the maximum
        ### number of character needed to be used when
        ### calculating the necessary adjustments, while
        ### the value of max_char_needed attribute (if it
        ### exists) has the current value used;
        ###
        ### if we had to set the new value for the attribute
        ### (because it wasn't the same as the current
        ### one), we trigger the adjustment of the editing
        ### area right away

        if had_to_set_new_value(self, "max_char_needed", max_char_needed):
            self.adjust_editing_area_left_and_width()
Trigger adjustment of editing area if needed.

        That is, if the number of characters needed to blit
        the highest line number increases or decreases,
        adjust width and left position of the editing area
        to compensate for the space gained or taken.
        
nodezator/textman/editor/cursor/op.py