From a0e66b1c46ec57218f8a95a21ace7cbbceb29ec2 Mon Sep 17 00:00:00 2001 From: Adam Scarr Date: Thu, 10 Aug 2017 21:58:14 +1000 Subject: Document cuts --- state.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'state.go') diff --git a/state.go b/state.go index 384eb32..64737dc 100644 --- a/state.go +++ b/state.go @@ -92,7 +92,7 @@ func (s *State) Get() string { // Preview of the the next x characters func (s *State) Preview(x int) string { - if s.Pos > len(s.Input) { + if s.Pos >= len(s.Input) { return "" } if len(s.Input)-s.Pos >= x { -- cgit v1.2.3