docs: def _paint_margin(self, event):
          """ Paints the right margin after editor paint event. """
          font = QtGui.QFont(self.editor.font_name, self.editor.font_size +
                             self.editor.zoom_level)
          metrics = QtGui.QFontMetricsF(font)
          pos = self._margin_pos
          offset = self.editor.contentOffset().x() + \
              self.editor.document().documentMargin()
          x80 = round(metrics.width(' ') * pos) + offset
          painter = QtGui.QPainter(self.editor.viewport())
          painter.setPen(self._pen)
          painter.drawLine(x80, 0, x80, 2 ** 16)