From a4322dc524ff3d7ae78dc7717b4b6b8805d4b148 Mon Sep 17 00:00:00 2001 From: Noboru Saito Date: Tue, 2 Jan 2024 08:12:19 +0900 Subject: [PATCH] =?UTF-8?q?Fixed=20movement=20when=20displaying=20above=20?= =?UTF-8?q?line=200=20=E2=80=8B=20Fixed=20the=20number=20of=20lines=20to?= =?UTF-8?q?=20move=20when=20displaying=20minus=20lines.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- oviewer/move_vertical.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/oviewer/move_vertical.go b/oviewer/move_vertical.go index 8d5abd39..c1906304 100644 --- a/oviewer/move_vertical.go +++ b/oviewer/move_vertical.go @@ -173,6 +173,10 @@ func (m *Document) moveYDown(moveY int) { } // WrapMode + if m.topLN < 0 { + m.limitMoveDown(m.topLX, m.topLN+1) + return + } lN := m.topLN + m.firstLine() lX := m.topLX listX := m.leftMostX(lN)