> Also with active selection spanning more than the
> current paragraph?

no, it only handles single paragraphs.

am trying to addresss this and have the following:

        case LFUN_PARAGRAPH_MOVE_DOWN: {
                pit_type begpit = cur.selBegin().pit()-1;
                pit_type pit = cur.selEnd().pit();
                bool counterUpdate = true;
                while (pit>begpit) {
                        std::swap(pars_[pit], pars_[pit+1]);
                        --pit;
                }
                ++cur.pit();
                if (cur.selection()) {
                        // adjust selection
                }

                if (counterUpdate)
                        updateCounters(cur.buffer());
                needsUpdate = true;
                break;
        }


i am not able to adjust the selection. 

++cur.pit() moves the selection at the cursor side, but not at the point where 
the selection was started. hints?

second thing the code above does not do is flag whether we need to update the 
counters. the looping is over paragraphs, whereas needsCounterUpdate() wants a 
ParIterator...

thanks, edwin

Reply via email to