Russ Cox is sharing code with you

Bitbucket is a code hosting site. Unlimited public and private repositories. Free for small teams.

Don't show this again

rsc / plan9port http://swtch.com/plan9port/

Plan 9 from User Space (aka plan9port) is a port of many Plan 9 programs from their native Plan 9 environment to Unix-like operating systems. See the web site http://swtch.com/plan9port/ for details.

Clone this repository (size: 58.2 MB): HTTPS / SSH
hg clone https://bitbucket.org/rsc/plan9port
hg clone ssh://hg@bitbucket.org/rsc/plan9port

Issues

#80 acme and :?<regexp>

Reported by eaburns

Acme seems to neglect the poor ?<regexp>? format when looking for text via :?<regexp>

To reproduce the error: try to 3-click on :?<regexp> in order to search (in reverse) for a given expression within acme.

The problem seems to be that acme doesn't recognize '?' as a valid address rune. The attached patch appears to fix the issue.

Status: resolved Responsible: nobody Type: bug Priority: major
Milestone: none Component: none Version: none

Attachments

Comments and changes

  1. #1 eaburns

    written

    As far as I can tell the patch wasn't attached correctly. Anyway, its *really* short:

    --- acme/addr.c 2011-06-17 21:19:30.495814279 -0700
    +++ acme/addr.c 2011-06-30 21:42:44.814330489 -0700
    @@ -27,7 +27,7 @@ enum
     int
     isaddrc(int r)
     {
    -       if(r && utfrune("0123456789+-/$.#,;", r)!=nil)
    +       if(r && utfrune("0123456789+-/$.#,;?", r)!=nil)
                    return TRUE;
            return FALSE;
     }
    
  2. #2 Anonymous

    written

    I've always used :-/regexp, as presumably does everyone else who does backward searches (since ? doesn't work).

    I think the ? code might have snuck in from sam. It's not clear that it's intentional.

  3. #3 Russ Cox

    written

    • Changed status from new to resolved.

    acme: allow :?regexp for backward search

    Fixes issue 80.

    R=rsc http://codereview.appspot.com/4662088

    98196ecda9f9

Add comment / attachment

Verification: Please write the text from the image in the box (letters only)

captcha

Is that you, Humanoid? Is this me?