(self)
Paste lines from the clipboard
Paste lines from the clipboard
Paste lines from the clipboard
def _onShortcutPasteLine(self):
        """Paste lines from the clipboard
        """
        text = QApplication.clipboard().text()
        if text:
            with self:
                if self.textCursor().hasSelection():
                    startBlockNumber, _ = self._selectedBlockNumbers()
                    del self.lines[self._selectedLinesSlice()]
                    self.lines.insert(startBlockNumber, text)
                else:
                    line, col = self.cursorPosition
                    if col > 0:
                        line = line + 1
                    self.lines.insert(line, text)
def _onShortcutPasteLine ( self ) : text = QApplication . clipboard ( ) . text ( ) if text : with self : if self . textCursor ( ) . hasSelection ( ) : startBlockNumber , _ = self . _selectedBlockNumbers ( ) del self . lines [ self . _selectedLinesSlice ( ) ] self . lines . insert ( startBlockNumber , text ) else : line , col = self . cursorPosition if col > 0 : line = line + 1 self . lines . insert ( line , text )