summaryrefslogtreecommitdiff
path: root/state.go
diff options
context:
space:
mode:
authorAdam Scarr <adam@vektah.net>2017-08-10 21:58:14 +1000
committerAdam Scarr <adam@vektah.net>2017-08-10 22:01:06 +1000
commita0e66b1c46ec57218f8a95a21ace7cbbceb29ec2 (patch)
tree630056d07ca6b44f7a747b7872ba422c6c301d85 /state.go
parentaf542eff9e1e51561a9efa37685ee07b1d01b53e (diff)
Document cuts
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 {