On Wed, Dec 12, 2001 at 11:02:55AM +0100, Jean-Marc Lasgouttes wrote:

> Andre> On Tue, Dec 11, 2001 at 11:16:58AM +0100, Andre Poenitz wrote:
> Andre> Hmpf... of course I meant just the chunk in lyxfind.C:
> 
> John, could you have a look at that?

sorry, missed the original - what's the problem ?


> Also, I do not understand the
> following code in SearchForward:
> 
>               if (pos >= par->size()) {
>                       prev_par = par;
>                       // consider 0-sized empty pars
>                       prev_pos = std::min(pos, par->size());
> 
> Shouldn't it be
> 
>               if (pos >= par->size()) {
>                       prev_par = par;
>                       // consider 0-sized empty pars
>                       prev_pos = par->size();

uh, yeah, I think so - it must have been left in from a previous attempt
to do it slightly differently. So I don't think we need prev_pos at all,
we can always do prev_par->size() in the setCursor call on fail case.

right ? (it's early for me ..)

regards
john

-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
        - Jonathan S. Shapiro

Reply via email to