summaryrefslogtreecommitdiff
path: root/sys/src/cmd/acme/text.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2020-09-22 11:42:15 -0700
committerOri Bernstein <ori@eigenstate.org>2020-09-22 11:42:15 -0700
commit313aebb96478c37be8f39754875c02dcb3f896cc (patch)
tree880c9ba449631562b136135e3e9a7e6169d178f6 /sys/src/cmd/acme/text.c
parentc1c904776c1536e854c5c1717a104353f885c3cd (diff)
acme: import changes from plan9port (thanks jxy)
Import the following improvements and bugfixes from plan9port: 4650064a acme: scale window bodies on resize, not including tag space d28913a9 acme: save/restore multiline tags in Dump/Load d2df5d6c acme: fix crash in X |cat with multiple windows 3d6e5cb5 acme: preserve window position and selection during Get
Diffstat (limited to 'sys/src/cmd/acme/text.c')
-rw-r--r--sys/src/cmd/acme/text.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/cmd/acme/text.c b/sys/src/cmd/acme/text.c
index ebbc5dcfd..484ec3de1 100644
--- a/sys/src/cmd/acme/text.c
+++ b/sys/src/cmd/acme/text.c
@@ -1411,7 +1411,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->nc; i++){