Am Dienstag, 2. Mai 2017 um 17:56:21, schrieb Tommaso Cucinotta <tomm...@lyx.org> > On 02/05/2017 11:19, Kornel Benko wrote: > > Start lyx > > select new file > > type anything e.g. 'abcd' > > Goto home position > > in minibuffer type word-findadv a<Return> > > Any (or no at all) parameter to this function leads to crash. > > This is independent of active search dialog. > > (would be great to have an autotest for this :-) ) > the attached patch fixes the crash for me, can you please check ? > > Can we commit to master now ?
In case you had not noticed, with this committed patch many of findadv test do not pass. > > For comparision, the function 'word-find' does not crash, but doesn't find > > anything either. > > these LFUNs use a special syntax to be provided, encoding the set of > available search options as a string; the regular word-find can be hand-made, > but the one needed by the word-findadv() requires a multi-line options string > including the name of the search and replace internal buffers within > theBuffers(), which are generally things internal to LyX and not exposed to > the user... > ... if we'd like to have a "word-findadv a" command to find "a" with default > options, that can be achieved by tweaking the > > istringstream & operator>>(istringstream & is, FindAndReplaceOptions & opt) > > function in lyxfind.cpp. Can't remember why this is done this way (passing > the names of these 2 buffers), probably at that time I couldn't find a > better/simpler way to find those 2 special buffers from the lyxfind.cpp > context :-(! > > T. Kornel
signature.asc
Description: This is a digitally signed message part.