Re: [PATCH] Fix pager search behavior with REG_NEWLINE.

"Kevin J. McCarthy" <[email protected]> Thu, 21 May 2026 19:32:22 +0800
Newsgroups gmane.mail.mutt.devel
Message-ID <ag7tRl6C0LiiRYd-@qinghai>
On Thu, May 21, 2026 at 12:57:39PM +0200, Alejandro Colomar via Mutt-dev wrote:
>> The search chunk was relocated into a function resolve_search().
>>
>> The newline removal/re-add was copied from a different function in the
>> pager code, match_body_patterns().
>>
>> > > diff --git a/pager.c b/pager.c
>> > > index 92fa152a..75221643 100644
>> > > --- a/pager.c
>> > > +++ b/pager.c
>> > > @@ -1268,6 +1268,47 @@ bail:
>> > >    return rc;
>> > >  }
>> > >
>> > > +static void resolve_search(struct line_t *lineInfo, int n, char *fmt,
>> > > +                           regex_t *SearchRE)
>
>Here, fmt is declared as char*, regardless of where it comes from
>(see below).

Ah, sorry.  Yes, you're right, I casted it in the call to this function 
but didn't update it here.  I'll do that.

-- 
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEiXWpszqjeRA4XFMIre92hIAxa9oFAmoO7UYACgkQre92hIAx
a9qpdxAAwl+JCUT14Eb4U7AngostvIV+zeRTN87jqFhDguxCGseYaaUuPw9saQU3
0D+g1XKqYnblEgGIvcL0rf4fFiPIHD0fMEIM6fjJqN2ufqgRHgiqU/2cKD2ZyZN+
2uUK8Xkz00P6LxWmDEOofo92ufrZRLs8nzdlleL3OABMUiU8+2aJVCsC21omfFjo
5ij+kdS8+ihzn4G2ZNDAb57R0X4SQnWUSncIWRo4Wgp2WnGJ/KXTanydLdS+lyZh
x1DHZ+Hw6hRH1srs9phMcIIAawa4ZcE8dAPw5SQrdFB/h86D+ciWt32ZGhPEYv2p
UYT+uRVXAI07FJPwdCgS6dlsS47qSN3dmxhY9pNSXPzSOqF2M2HkAKYpj9fMaOCA
2vLQNXlhahGc1V7NTJMe2nSo2agJQwTDDRo7kHe6uyId6daLf9Bk+qiHdCF0QOqd
nExopeQ9mVvhkYK9c/8kJvtIUnDeLgl9hAZl1rLMFuaVrob+Og2abyyinJ57Af75
4WcsylLlYUidXi759K/O0BEAMVclGGvx1cTVOcBB95mAS0ne8bromV9AvMER7BfK
9hQnWNX83ObkveDto1HyNYZkjziNAIK2wYh/KQ3sURaIGJ8IxChqXHsLYSi/vQJo
cKCPwcFOApAHMMeC3qT7cCBCT2QteoBpKloeLOJZySXeLoHwzqk=
=cPtt
-----END PGP SIGNATURE-----