aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/acme/text.c
diff options
context:
space:
mode:
authorPetter Rodhelind <petter.rodhelind@gmail.com>2017-11-06 15:19:40 +0100
committerPetter Rodhelind <petter.rodhelind@gmail.com>2017-11-06 15:19:40 +0100
commita8c75a106f5d6e283c6b23e2592207ee5d5bce29 (patch)
tree6869c3e18b920b2b71e0ad02430c0d0c50cac741 /src/cmd/acme/text.c
parentf25f90ea3332df18129558fd246f7b5d4c80b4d8 (diff)
parent3d6e5cb56a6249e7f3001091fe81c171cd501319 (diff)
downloadplan9port-a8c75a106f5d6e283c6b23e2592207ee5d5bce29.tar.gz
plan9port-a8c75a106f5d6e283c6b23e2592207ee5d5bce29.tar.bz2
plan9port-a8c75a106f5d6e283c6b23e2592207ee5d5bce29.zip
Merge remote-tracking branch 'upstream/master'
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 e47c97d2..5b87f820 100644
--- a/src/cmd/acme/text.c
+++ b/src/cmd/acme/text.c
@@ -1677,7 +1677,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++){