+ case LFUN_NEXT: {
+ int column = actcol;
+ if (the_locking_inset) {
+ UnlockInsetInInset(bv, the_locking_inset);
+ the_locking_inset = 0;
+ }
+ if (bv->text->first + bv->painter().paperHeight() <
+ (top_baseline + tabular->GetHeightOfTabular()))
+ {
+ bv->scrollCB(bv->text->first + bv->painter().paperHeight());
+ UpdateLocal(bv, FULL, false);
+ actcell = tabular->GetCellBelow(first_visible_cell) + column;
+ } else {
+ actcell = tabular->GetFirstCellInRow(tabular->rows() - 1) + column;
+ }
+ resetPos(bv);
+ UpdateLocal(bv, CURSOR, false);
+ break;
+ }
+ case LFUN_PRIOR: {
+ int column = actcol;
+ if (the_locking_inset) {
+ UnlockInsetInInset(bv, the_locking_inset);
+ the_locking_inset = 0;
+ }
+ if (top_baseline < 0) {
+ bv->scrollCB(bv->text->first - bv->painter().paperHeight());
+ UpdateLocal(bv, FULL, false);
+ if (top_baseline > 0)
+ actcell = column;
+ else
+ actcell = tabular->GetCellBelow(first_visible_cell) + column;
+ } else {
+ actcell = column;
+ }
+ resetPos(bv);
+ UpdateLocal(bv, CURSOR, false);
+ break;
+ }