'Highlight current line'

def highlight_current_line(self):

    selection = QTextEdit.ExtraSelection()
    selection.format.setProperty(QTextFormat.FullWidthSelection, to_qvariant(True))
    selection.format.setBackground(self.currentline_color)
    selection.cursor = self.textCursor()
    selection.cursor.clearSelection()
    self.set_extra_selections('current_line', [selection])
    self.update_extra_selections()
