переписал CopyWord

MyString
serr 2025-02-11 13:58:23 +03:00
parent 7595deff9b
commit 77db30e1d0
1 changed files with 2 additions and 2 deletions

View File

@ -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)