diff --git a/mvc/models.py b/mvc/models.py index 53fec60..79424df 100644 --- a/mvc/models.py +++ b/mvc/models.py @@ -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