nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] search: skip a match on the magic line, as it is a just c


From: Benno Schulenberg
Subject: Re: [PATCH v2] search: skip a match on the magic line, as it is a just convenience line
Date: Mon, 12 Sep 2022 09:04:57 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

Op 09-09-2022 om 12:55 schreef Benno Schulenberg:
> As the magic line isn't really a line (it is not counted in the number
> of lines read and written), and nothing is on it (not even a newline),
> it doesn't make sense to allow any regex, like ^ or $, to match it.
> 
> This fixes https://savannah.gnu.org/bugs/?63034.
> Indirectly-reported-by: Mike Scalora <mike@scalora.org>


> +                     /* When not on the magic line, the match is valid. */
> +                     if (line->next || line->data[0])
> +                             break;

Merged into master:

  https://git.savannah.gnu.org/cgit/nano.git/commit/?id=50954a4b

Benno

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]