переписал 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: def CopyWord(self) -> None:
start_index, end_index = self.WordUnderCursor() start_index, end_index = self.WordUnderCursor()
line = self.displayBuffer[self.currentLine].data() self.exchangeBuffer = self.displayBuffer[self.currentLine].\
self.exchangeBuffer = line[start_index:end_index+1] substr(start_index, end_index-start_index).data()
def Paste(self) -> None: def Paste(self) -> None:
self.displayBuffer[self.currentLine].insert(self.currentCol, self.exchangeBuffer) self.displayBuffer[self.currentLine].insert(self.currentCol, self.exchangeBuffer)