On Sun, Apr 10, 2005 at 10:47:37AM +0300, Martin Vermeer wrote:
> This sounds great... to make it perfectly clear, you propose to replace
> the loop at
> 
>     204         for (; depth(); pop()) {
>                   ...
>     214                 disp_.update(true);
>     215                 disp_.dispatched(true);
>     216                 inset().dispatch(*this, cmd);
>     217                 if (disp_.dispatched())
>     218                         break;
>     219         }
> 
> by a similar one testing for
> 
>               while(!lfun_queue.empty()) {
>                  ...
>               inset().dispatch(*this, cmd);
>               lfun_queue.pop_back();
>               }

We'd probably need two nested loops

                while (!lfun_queue.empty()) {
                  cmd = lfun_queue.pop_front();
                        LCursor tmp = *this;
                        for (; tmp.depth(); tmp.pop()) {
                                if (inset().dispatch(tmp, cmd)) {
                                        *this = tmp;
                                        break;
                                }
                        }
                }

or similar.

>       case LFUN_<something>:
>               <do something>;
>               cmd = FuncRequest(LFUN_FINISHED_<direction>);
>               cur.undispatched();
>               break;
> by
>       case LFUN_<something>:
>               <do something>;
>               cur.lfun_queue.push_back(LFUN_<something>));
>               break;
> ?
> 
> The current solution is indeed a bit of a kludge, as it allows only
> queing of a single LFUN to the inset level above.
> 
> Perhaps not for 1.4.0 though as we're in freeze.

Indeed. Right now we should just add the missing 'cur.undispatched()'
calls.

Andre'

Reply via email to