summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/src/cmd/acme/text.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/src/cmd/acme/text.c b/sys/src/cmd/acme/text.c
index 439e5ec78..eda8f10de 100644
--- a/sys/src/cmd/acme/text.c
+++ b/sys/src/cmd/acme/text.c
@@ -649,16 +649,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->nc){
- typecommit(t);
+ typecommit(t);
+ if(t->q1 < t->file->nc)
textshow(t, t->q1+1, t->q1+1, TRUE);
- }
return;
case Kdown:
n = t->maxlines/3;