aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/acme/text.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/acme/text.c')
-rw-r--r--src/cmd/acme/text.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/acme/text.c b/src/cmd/acme/text.c
index 4832de8e..8ff5884d 100644
--- a/src/cmd/acme/text.c
+++ b/src/cmd/acme/text.c
@@ -1615,7 +1615,7 @@ textsetorigin(Text *t, uint org, int exact)
Rune *r;
uint n;
- if(org>0 && !exact){
+ if(org>0 && !exact && textreadc(t, org-1) != '\n'){
/* org is an estimate of the char posn; find a newline */
/* don't try harder than 256 chars */
for(i=0; i<256 && org<t->file->b.nc; i++){