summaryrefslogtreecommitdiff
path: root/sys/src/cmd/rio
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2014-01-11 10:46:07 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2014-01-11 10:46:07 +0100
commit6a83facfb3f64f579847166af0321370e4062f9d (patch)
treec769df0641a159d06c10c0257108267f75546c2d /sys/src/cmd/rio
parent7c503e6f49b140a99535c317092cc2f32d2a7140 (diff)
rio: properly handle initial wrap arround in wlook()
Diffstat (limited to 'sys/src/cmd/rio')
-rw-r--r--sys/src/cmd/rio/wind.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/src/cmd/rio/wind.c b/sys/src/cmd/rio/wind.c
index 0c33c9616..fb117b614 100644
--- a/sys/src/cmd/rio/wind.c
+++ b/sys/src/cmd/rio/wind.c
@@ -900,6 +900,9 @@ wlook(Window *w)
if(n <= 0 || e < n)
return;
+ if(i > e)
+ i = 0;
+
while(runestrncmp(w->r+w->q0, w->r+i, n) != 0){
if(i < e)
i++;