On Mon, Jul 20, 2020 at 10:11:46PM +0200, Theo Buehler wrote:
> On Mon, Jul 13, 2020 at 03:47:13PM +0100, Mark Willson wrote:
> > Folks,
> >
> > The segmentation fault occurs when the string to replace is just the
> > "^" anchor (beginning-of-line) and the point is on an empty line.
> > Issue occu
> -Original Message-
> From: Theo Buehler
> Sent: 20 July 2020 21:12
> To: Mark Willson
> Cc: bugs@openbsd.org; hil...@codemadness.org
> Subject: Re: mg: segmentation fault when using query-replace-regexp
>
> On Mon, Jul 13, 2020 at 03:47:13PM +0100, Mark Willson wrote:
> > Folks,
> >
>
On Tue, Jul 21, 2020 at 11:55:39AM +0200, Hiltjo Posthuma wrote:
> On Mon, Jul 20, 2020 at 10:11:46PM +0200, Theo Buehler wrote:
> > On Mon, Jul 13, 2020 at 03:47:13PM +0100, Mark Willson wrote:
> > > Folks,
> > >
> > > The segmentation fault occurs when the string to replace is just the
> > > "^"
> Hmm. I get neither a seg fault nor a loop on my amd64 Lenove E595. The
> cursor moves to different spots in X/i3 xterm vs console and in either
> case doesn't do any replacement.
I can reproduce both behaviors reliably as follows both on console and
in xterm.
$ echo 'a\n\n\nb' > /tmp/test
$ mg
> -Original Message-
> From: Hiltjo Posthuma
> Sent: 21 July 2020 10:56
> > Index: re_search.c
> > ===
> > RCS file: /var/cvs/src/usr.bin/mg/re_search.c,v
> > retrieving revision 1.34
> > diff -u -p -r1.34 re_search.c
> > -
On Tue, Jul 21, 2020 at 05:33:39PM +0200, Theo Buehler wrote:
> > Hmm. I get neither a seg fault nor a loop on my amd64 Lenove E595. The
> > cursor moves to different spots in X/i3 xterm vs console and in either
> > case doesn't do any replacement.
>
> I can reproduce both behaviors reliably as fo