удалил лишние вызовы .copy()
parent
e22f700468
commit
f67703719b
|
@ -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": # Вставить после курсора
|
||||||
|
|
Loading…
Reference in New Issue