summaryrefslogtreecommitdiff
path: root/gwic.go
diff options
context:
space:
mode:
Diffstat (limited to 'gwic.go')
-rw-r--r--gwic.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/gwic.go b/gwic.go
index 375a213..5cbbd93 100644
--- a/gwic.go
+++ b/gwic.go
@@ -21,9 +21,9 @@ func printWithContext(all []string, ind, ctxlen int) {
slice = append(slice, "\""+all[ind]+"\"")
if len(all[:ind]) < ctxlen {
- slice = append(all[:ind-1], slice...)
+ slice = append(all[:ind], slice...)
} else {
- slice = append(all[ind-ctxlen:ind-1], slice...)
+ slice = append(all[ind-ctxlen:ind], slice...)
}
if len(all[ind:]) < ctxlen {