docs: def commit(self):
          """
          Insert the specified text in all selected lines, always
          at the same column position.
          """
  
          # Get the number of lines and columns in last line.
          last_line, last_col = self.qteWidget.getNumLinesAndColumns()
  
          # If this is the first ever call to this undo/redo element
          # then backup the current cursor- and marker position because
          # both will be required for the redo operation.
          if self.cursorPos is None:
              # Get the default marker and ensure it points to a
              # valid location inside the document.
              self.markerPos = self.qteWidget.qteGetMark()
              if self.markerPos is None:
                  return
              if not self.qteWidget.isPositionValid(*self.markerPos):
                  return
  
              # Backup the current cursor and marker position; swap
              # one for the other if necessary to ensure the marker
              # comes first.
              self.cursorPos = self.qteWidget.getCursorPosition()
              if self.cursorPos[0] < self.markerPos[0]:
                  self.cursorPos, self.markerPos = self.markerPos, self.cursorPos
  
          # Insert the specified string at the same position in every line
          # in between the mark and the cursor (inclusive).
          col = min((self.markerPos[1], self.cursorPos[1]))
          for line in range(self.markerPos[0], self.cursorPos[0] + 1):
              self.baseClass.insertAt(self.text, line, col)
  
          self.qteWidget.setCursorPosition(*self.cursorPos)