From 77db30e1d01ded00a9c1fe1642295929ac467fea Mon Sep 17 00:00:00 2001 From: serr Date: Tue, 11 Feb 2025 13:58:23 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B5=D0=BF=D0=B8=D1=81?= =?UTF-8?q?=D0=B0=D0=BB=20CopyWord?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mvc/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)