summaryrefslogtreecommitdiff
path: root/state.go
diff options
context:
space:
mode:
Diffstat (limited to 'state.go')
-rw-r--r--state.go2
1 files changed, 1 insertions, 1 deletions
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 {