PG_UP/PG_DOWN - перейти на экран вверх/вниз

master
serr 2025-02-05 00:34:35 +03:00
parent d200d36aee
commit 7e5c5d3723
1 changed files with 12 additions and 0 deletions

View File

@ -127,6 +127,18 @@ class VimModel:
self.currentCol = 0
case "p": # Вставить после курсора
self.displayBuffer[self.currentLine][self.currentCol+1:self.currentCol+1] = self.exchangeBuffer
case "PG_UP": # Перейти на экран вверх
self.currentCol = 0
if self.currentLine > self.displayLinesCount:
self.currentLine -= self.displayLinesCount
else:
self.currentLine = 0
case "PG_DOWN": # Перейти на экран вниз
self.currentCol = 0
if self.currentLine + self.displayLinesCount < len(self.displayBuffer):
self.currentLine += self.displayLinesCount
else:
self.currentLine = len(self.displayBuffer) - 1
return ReturnCode.GOOD