Howto modify selection from replace buffer (FindAdv)

Kornel Benko kornel at
Fri Jan 8 10:39:29 UTC 2021

I have problems to _use_ matched substrings in replace-mode.

For instance given regular expression containing some groups, like
and I want to change the found value to 'yyyyzzzzxxxx', so in regex I would write

Now the selection contains '\3\2\1', this is selected (in lyxfind.cpp:findAdvReplace())
		cap::pasteParagraphList(cur, repl_buffer.paragraphs(),
                LYXERR(Debug::FIND, "After pasteParagraphList() cur=" << cur << endl);
                sel_len = repl_buffer.paragraphs().begin()->size();
and then follows
	bv->putSelectionAt(DocIterator(cur), sel_len, !opt.forward);

How can I modify the data prior to inserting into buffer ?
The values of '\1', '\2', '\3' are known here, but are not used.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: Digitale Signatur von OpenPGP
URL: <>

More information about the lyx-devel mailing list