diff --git a/mvc/models.py b/mvc/models.py index 47571d4..ab95d6d 100644 --- a/mvc/models.py +++ b/mvc/models.py @@ -169,8 +169,8 @@ class VimModel: def CopyWord(self) -> None: start_index, end_index = self.WordUnderCursor() - line = self.displayBuffer[self.currentLine].data() - self.exchangeBuffer = line[start_index:end_index+1] + self.exchangeBuffer = self.displayBuffer[self.currentLine].\ + substr(start_index, end_index-start_index).data() def Paste(self) -> None: self.displayBuffer[self.currentLine].insert(self.currentCol, self.exchangeBuffer)