9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] right arrow blocked before closing bracket
Date: Fri, 22 Nov 2013 09:41:54 -0500	[thread overview]
Message-ID: <9a7cec5b12acc24677c70f01e79f399c@brasstown.quanstro.net> (raw)
In-Reply-To: <CALAsyW3JxLbJ5LaeZmQ6g+D+HgNgRhZqCNvshsqi1Z-LgPrMkA@mail.gmail.com>

On Fri Nov 22 08:22:29 EST 2013, vanattenmark@gmail.com wrote:
> In Plan 9 acme, if you type
>
> {}
>
> then go back and type text between the brackets
>
> {Curiouser and curiouser!}
>
> the right arrow is blocked when you want to go over the closing
> bracket to continue typing to its right. (If you first go to the left,
> and then back to the right, it works.)
>
> Same for the other brackets: [ ], ( ), < >.
>
> In p9p acme, and also in Plan 9 sam and rio, this works fine.
>
> Perhaps a patch already exists?
>

patch applied to 9atom

email
	quanstro@quanstro.net
readme
	reported by mark van atten

		In Plan 9 acme, if you type

		{}

		then go back and type text between the brackets

		{Curiouser and curiouser!}

		the right arrow is blocked when you want to go over the closing
		bracket to continue typing to its right. (If you first go to the left,
		and then back to the right, it works.)

		Same for the other brackets: [ ], ( ), < >.

	noted that brackets are not necessary.  same behavior with any
	character.

	fix is to textcommit before moving.
removed

files
	/sys/src/cmd/acme/text.c	text.c

/sys/src/cmd/acme/text.c	text.c
text.c.orig:653,668 - text.c:653,666
  	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;
------
merge...backup...copy...
cpfile text.c /n/dist/sys/src/cmd/acme/text.c
# remove these files if you want. I will not remove them for you
# (apatch/undo will not restore them)
done




  reply	other threads:[~2013-11-22 14:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-22 13:21 Mark van Atten
2013-11-22 14:41 ` erik quanstrom [this message]
2013-11-22 14:59   ` Mark van Atten
2013-11-22 18:29     ` cinap_lenrek

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=9a7cec5b12acc24677c70f01e79f399c@brasstown.quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /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).