[pyqgis-console] fixes the undo action when comment/uncomment out code in editor