JMarc wrote,
> The call should be something like:
> curstring = par.GetWord(&lastpos)
this seems to cause fits, but par->GetWord(pos) seems to work once I
made the other changes to pass variables rather than pointers.
also, I have the block
LyXCursor cursor = owner->currentBuffer()->text->cursor;
LyXParagraph *par = cursor.par;
int lastpos = cursor.pos-1;
if (lastpos < 0) lastpos=0;
// get the current word
// note that this must be done before
// inserting the inset, or the inset will break
// the word
LString curstring;
curstring = par->GetWord(lastpos);
all so that I can use the very last line.
also, asger suggested,
while (text[i] != whitespace) {
word += text[i++];
however, there isn't a whitespace definition around, is there? So i've
stayed with
while (IsLetter(lastpos)) theword += text[lastpos++];
The new patch follows.
--
- hawkins-980923.patch Richard E. Hawkins Esq.
- Re: hawkins-980923.patch Asger K. Alstrup Nielsen
- Re: hawkins-980923.patch Richard E. Hawkins Esq.
- Re: hawkins-980923.patch Lars Gullik Bj�nnes
- Re: hawkins-980923.patch Richard E. Hawkins Esq.
- Re: hawkins-980923.patch Jean-Marc Lasgouttes
- Re: hawkins-980923.patch Richard E. Hawkins Esq.
- Re: hawkins-980923.patch Lars Gullik Bj�nnes
- Re: hawkins-980923.patc... Richard E. Hawkins Esq.
- Re: hawkins-980923.... Lars Gullik Bj�nnes
- Re: hawkins-980923.patch Asger K. Alstrup Nielsen
