updateScreen();
updateScrollbar();
}
- screen_->first = screen_->TopCursorVisible(bv_->text);
+ bv_->text->first = screen_->TopCursorVisible(bv_->text);
redraw();
owner_->getDialogs()->updateBufferDependent();
bv_->insetWakeup();
bv_->text->selection = false;
}
}
- screen_->first = screen_->TopCursorVisible(bv_->text);
+ bv_->text->first = screen_->TopCursorVisible(bv_->text);
/* this will scroll the
* screen such that the
* cursor becomes
unsigned long cbth = 0;
long cbsf = 0;
- if (bv_->text)
+ if (bv_->text) {
cbth = bv_->text->height;
- if (screen_)
- cbsf = screen_->first;
+ cbsf = bv_->text->first;
+ }
// check if anything has changed.
if (max2 == cbth &&
LyXText * vbt = bv_->text;
unsigned int height = vbt->DefaultHeight();
- if (vbt->cursor.y() < screen_->first + height) {
+ if (vbt->cursor.y() < bv_->text->first + height) {
vbt->SetCursorFromCoordinates(bv_, 0,
- screen_->first +
+ bv_->text->first +
height);
} else if (vbt->cursor.y() >
- screen_->first + workarea_->height() - height) {
+ bv_->text->first + workarea_->height() - height) {
vbt->SetCursorFromCoordinates(bv_, 0,
- screen_->first +
+ bv_->text->first +
workarea_->height() -
height);
}
bv_->the_locking_inset->
InsetMotionNotify(bv_,
x - cursor.x(),
- y - cursor.y() + screen_->first,
+ y - cursor.y() + bv_->text->first,
state);
return;
}
if (selection_possible) {
screen_->HideCursor();
- bv_->text->SetCursorFromCoordinates(bv_, x, y + screen_->first);
+ bv_->text->SetCursorFromCoordinates(bv_, x, y + bv_->text->first);
if (!bv_->text->selection)
update(BufferView::UPDATE); // Maybe an empty line was deleted
// Right button mouse click on a table
if (button == 3 &&
(bv_->text->cursor.par()->table ||
- bv_->text->MouseHitInTable(bv_, xpos, ypos + screen_->first))) {
+ bv_->text->MouseHitInTable(bv_, xpos, ypos + bv_->text->first))) {
// Set the cursor to the press-position
- bv_->text->SetCursorFromCoordinates(bv_, xpos, ypos + screen_->first);
+ bv_->text->SetCursorFromCoordinates(bv_, xpos, ypos + bv_->text->first);
bool doit = true;
// Only show the table popup if the hit is in
}
#endif
- int screen_first = screen_->first;
+ int screen_first = bv_->text->first;
// Middle button press pastes if we have a selection
bool paste_internally = false;
int box_x = 20; // LYX_PAPER_MARGIN;
box_x += lyxfont::width(" wide-tab ", font);
- unsigned int screen_first = screen_->first;
+ unsigned int screen_first = bv_->text->first;
if (x < box_x
&& y + screen_first > bv_->text->cursor.y() -
if (!screen_)
return 0;
- unsigned int y_tmp = y + screen_->first;
+ unsigned int y_tmp = y + bv_->text->first;
LyXCursor cursor;
bv_->text->SetCursorFromCoordinates(bv_, cursor, x, y_tmp);
{
if (!bv_->text->cursor.row()->previous()) return;
- long y = screen_->first;
+ long y = bv_->text->first;
Row * cursorrow = bv_->text->cursor.row();
bv_->text->SetCursorFromCoordinates(bv_, bv_->text->cursor.x_fix(), y);
bv_->text->FinishUndo();
{
if (!bv_->text->cursor.row()->next()) return;
- long y = screen_->first;
+ long y = bv_->text->first;
bv_->text->GetRowNearY(y);
Row * cursorrow = bv_->text->cursor.row();
bv_->text->SetCursorFromCoordinates(bv_, bv_->text->cursor.x_fix(), y