9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] right arrow blocked before closing bracket
@ 2013-11-22 13:21 Mark van Atten
  2013-11-22 14:41 ` erik quanstrom
  0 siblings, 1 reply; 4+ messages in thread
From: Mark van Atten @ 2013-11-22 13:21 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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?

Mark.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] right arrow blocked before closing bracket
  2013-11-22 13:21 [9fans] right arrow blocked before closing bracket Mark van Atten
@ 2013-11-22 14:41 ` erik quanstrom
  2013-11-22 14:59   ` Mark van Atten
  0 siblings, 1 reply; 4+ messages in thread
From: erik quanstrom @ 2013-11-22 14:41 UTC (permalink / raw)
  To: 9fans

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




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] right arrow blocked before closing bracket
  2013-11-22 14:41 ` erik quanstrom
@ 2013-11-22 14:59   ` Mark van Atten
  2013-11-22 18:29     ` cinap_lenrek
  0 siblings, 1 reply; 4+ messages in thread
From: Mark van Atten @ 2013-11-22 14:59 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

That is very quick---thanks, Erik! I just tried out the patch on Bell
Labs Plan 9, and it works fine.

Mark.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] right arrow blocked before closing bracket
  2013-11-22 14:59   ` Mark van Atten
@ 2013-11-22 18:29     ` cinap_lenrek
  0 siblings, 0 replies; 4+ messages in thread
From: cinap_lenrek @ 2013-11-22 18:29 UTC (permalink / raw)
  To: 9fans

just applied to 9front. thank you mark and erik. :-)

--
cinap



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-11-22 18:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-22 13:21 [9fans] right arrow blocked before closing bracket Mark van Atten
2013-11-22 14:41 ` erik quanstrom
2013-11-22 14:59   ` Mark van Atten
2013-11-22 18:29     ` cinap_lenrek

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).