9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Xiao-Yong Jin <meta.jxy@gmail.com>
To: 9front@9front.org
Subject: [9front] three small changes in acme from plan9port
Date: Fri, 9 Apr 2021 00:18:36 -0500	[thread overview]
Message-ID: <954A7C66-39DC-4AA1-B51F-C9E575723FD0@gmail.com> (raw)

origin:

https://github.com/9fans/plan9port/pull/493
https://github.com/9fans/plan9port/pull/489
https://github.com/9fans/plan9port/pull/461

hg diff follows:

diff -r 303fbe43c06d sys/src/cmd/acme/cols.c
--- a/sys/src/cmd/acme/cols.c	Fri Apr 09 03:18:53 2021 +0200
+++ b/sys/src/cmd/acme/cols.c	Thu Apr 08 23:50:06 2021 -0500
@@ -208,8 +208,8 @@
 			r1.max.y = r.max.y;
 		else {
 			r1.max.y = r1.min.y;
-			if(new > 0 && old > 0 && Dy(w->r) > Border+font->height)
-				r1.max.y += (Dy(w->r)-Border-font->height)*new/old + Border + font->height;
+			if(new > 0 && old > 0 && Dy(w->r) > font->height)
+				r1.max.y += (Dy(w->r)-font->height)*new/old + Border + font->height;
 		}
 		r2 = r1;
 		r2.max.y = r2.min.y+Border;
@@ -422,7 +422,7 @@
 		}
 		if(j < c->nw-1){	/* no border on last window */
 			r.min.y = v->r.max.y;
-			r.max.y += Border;
+			r.max.y = r.min.y + Border;
 			draw(screen, r, display->black, nil, ZP);
 		}
 		y1 = r.max.y;
diff -r 303fbe43c06d sys/src/cmd/acme/text.c
--- a/sys/src/cmd/acme/text.c	Fri Apr 09 03:18:53 2021 +0200
+++ b/sys/src/cmd/acme/text.c	Thu Apr 08 23:50:06 2021 -0500
@@ -664,6 +664,7 @@
 	uint q0, q1;
 	int nnb, nb, n, i;
 	int nr;
+	Rune rr;
 	Rune *rp;
 	Text *u;
 
@@ -818,10 +819,10 @@
 			nr = 0;
 			rp[nr++] = r;
 			for(i=0; i<nnb; i++){
-				r = textreadc(t, t->q0-nnb+i);
-				if(r != ' ' && r != '\t')
+				rr = textreadc(t, t->q0-nnb+i);
+				if(rr != ' ' && rr != '\t')
 					break;
-				rp[nr++] = r;
+				rp[nr++] = rr;
 			}
 		}
 		break; /* fall through to normal code */


             reply	other threads:[~2021-04-10 16:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-09  5:18 Xiao-Yong Jin [this message]
2021-04-15  3:30 ` ori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=954A7C66-39DC-4AA1-B51F-C9E575723FD0@gmail.com \
    --to=meta.jxy@gmail.com \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).