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.



-- 

Reply via email to