aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/9term
diff options
context:
space:
mode:
authorDavid Swasey <david.swasey@gmail.com>2011-09-12 12:36:30 -0400
committerRuss Cox <rsc@swtch.com>2011-09-12 12:36:30 -0400
commit53000799bec3a182fe5cc64424bc6302d1e6ba55 (patch)
tree3607ed2fdba07b7605ebab2dee5d12407d951391 /src/cmd/9term
parenta287dbab235c9041a32300a9e0bb60ef41864963 (diff)
downloadplan9port-53000799bec3a182fe5cc64424bc6302d1e6ba55.tar.gz
plan9port-53000799bec3a182fe5cc64424bc6302d1e6ba55.tar.bz2
plan9port-53000799bec3a182fe5cc64424bc6302d1e6ba55.zip
9term: fix insert
R=rsc CC=plan9port.codebot http://codereview.appspot.com/4952066
Diffstat (limited to 'src/cmd/9term')
-rw-r--r--src/cmd/9term/wind.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/9term/wind.c b/src/cmd/9term/wind.c
index a7050a2d..40889900 100644
--- a/src/cmd/9term/wind.c
+++ b/src/cmd/9term/wind.c
@@ -1621,10 +1621,10 @@ winsert(Window *w, Rune *r, int n, uint q0)
w->q0 += n;
if(q0 < w->qh)
w->qh += n;
- if(q0 < w->org)
- w->org += n;
if(q0 < w->iq1)
w->iq1 += n;
+ if(q0 < w->org)
+ w->org += n;
else if(q0 <= w->org+w->f.nchars)
frinsert(&w->f, r, r+n, q0-w->org);
return q0;