acme: fix arrow near end of text

R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/5399050
This commit is contained in:
Sean McKean 2011-11-17 14:46:14 -05:00 committed by Russ Cox
parent e067d2ea1f
commit 81c30b5a75
2 changed files with 5 additions and 6 deletions

View file

@ -30,6 +30,7 @@ Peter Saveliev <svinota.saveliev@gmail.com>
Richard Miller <millerresearch@gmail.com>
Rob Pike <robpike@gmail.com>
Russ Cox <rsc@swtch.com>
Sean McKean <smckean83@gmail.com>
Tim Newsham <tim.newsham@gmail.com>
Tony Lainson <t.lainson@gmail.com>
Venkatesh Srinivas <extrudedaluminiu@gmail.com>

View file

@ -671,16 +671,14 @@ texttype(Text *t, Rune r)
rp = &r;
switch(r){
case Kleft:
if(t->q0 > 0){
typecommit(t);
typecommit(t);
if(t->q0 > 0)
textshow(t, t->q0-1, t->q0-1, TRUE);
}
return;
case Kright:
if(t->q1 < t->file->b.nc){
typecommit(t);
typecommit(t);
if(t->q1 < t->file->b.nc)
textshow(t, t->q1+1, t->q1+1, TRUE);
}
return;
case Kdown:
if(t->what == Tag)