удалил лишние вызовы .copy()

master
serr 2025-02-04 23:15:40 +03:00
parent e22f700468
commit f67703719b
1 changed files with 2 additions and 2 deletions

View File

@ -113,7 +113,7 @@ class VimModel:
if self.currentCol + 1 < len(self.displayBuffer[self.currentLine]): if self.currentCol + 1 < len(self.displayBuffer[self.currentLine]):
del self.displayBuffer[self.currentLine][self.currentCol + 1] del self.displayBuffer[self.currentLine][self.currentCol + 1]
case "yy": # копирует текущую строку case "yy": # копирует текущую строку
self.exchangeBuffer = self.displayBuffer[self.currentLine].copy() self.exchangeBuffer = self.displayBuffer[self.currentLine]
case "yw": # Копирует слово под курсором case "yw": # Копирует слово под курсором
start_index, end_index = self.WordUnderCursor() start_index, end_index = self.WordUnderCursor()
line = self.displayBuffer[self.currentLine] line = self.displayBuffer[self.currentLine]
@ -126,7 +126,7 @@ class VimModel:
self.displayBuffer[self.currentLine] = line[:start_index] + line[end_index:] self.displayBuffer[self.currentLine] = line[:start_index] + line[end_index:]
self.currentCol = start_index self.currentCol = start_index
case "dd": # Вырезает текущую строку case "dd": # Вырезает текущую строку
self.exchangeBuffer = self.displayBuffer[self.currentLine].copy() self.exchangeBuffer = self.displayBuffer[self.currentLine]
self.displayBuffer[self.currentLine] = [] self.displayBuffer[self.currentLine] = []
self.currentCol = 0 self.currentCol = 0
case "p": # Вставить после курсора case "p": # Вставить после курсора