From 2d9b38b93eb16b341e91ec5d8eaaa9898f1d68f6 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sat, 10 Jan 2015 14:22:00 +0900 Subject: [PATCH] Constrain cy in vmove() --- src/terminal.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/terminal.go b/src/terminal.go index c9db8ff..fb17ce5 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -602,6 +602,7 @@ func (t *Terminal) vmove(o int) { } else { t.cy += o } + t.cy = Max(0, Min(t.cy, t.merger.Length()-1)) } func maxItems() int {