#include "language.h"
#include "support/tostr.h"
#include "support/lstrings.h"
+#include "support/LAssert.h"
#include "frontends/LyXView.h"
#include "frontends/screen.h"
#include "frontends/Dialogs.h"
if (lt->isInInset())
bv->updateInset(lt->inset_owner);
else
- bv->toggleToggle();
+ bv->repaint();
}
if (!lt->isInInset()) {
bv->update(lt, BufferView::SELECT);
// check if the given co-ordinates are inside an inset at the
// given cursor, if one exists. If so, the inset is returned,
// and the co-ordinates are made relative. Otherwise, 0 is returned.
- InsetOld * checkInset(BufferView * bv, LyXText & text,
+InsetOld * checkInset(BufferView * /*bv*/, LyXText & text,
LyXCursor const & cur, int & x, int & y)
{
lyx::pos_type const pos = cur.pos();
// get inset dimensions
Assert(par->getInset(pos));
- LyXFont const & font = text.getFont(bv->buffer(), par, pos);
+ LyXFont const & font = text.getFont(par, pos);
int const width = inset->width();
int const inset_x = font.isVisibleRightToLeft()
int y = top_y();
if (cursorRow() == rows().begin()) {
- if (y > 0) {
- int new_y = bv()->text->top_y() - bv()->workHeight();
- bv()->screen().draw(bv()->text, bv(), new_y < 0 ? 0 : new_y);
+ if (y > 0)
bv()->updateScrollbar();
- }
return;
}
return;
// This is what we used to do, so we wouldn't skip right past
// tall rows, but it's not working right now.
-#if 0
- new_y = bv->text->top_y() - bv->workHeight();
-#endif
} else {
if (inset_owner) {
new_y = bv()->text->cursor.iy()
- bv()->workHeight() + 1;
}
}
- bv()->screen().draw(bv()->text, bv(), new_y < 0 ? 0 : new_y);
+ //bv()->screen().draw(bv()->text, bv(), new_y < 0 ? 0 : new_y);
if (cursorRow() != rows().begin()) {
LyXCursor cur;
setCursor(cur, boost::prior(cursorRow())->par(),
int y = cursor.y() - cursorRow()->baseline() +
cursorRow()->height();
if (y > topy + bv()->workHeight()) {
- bv()->screen().draw(bv()->text, bv(), bv()->text->top_y() + bv()->workHeight());
+ //bv()->screen().draw(bv()->text, bv(), bv()->text->top_y() + bv()->workHeight());
bv()->updateScrollbar();
}
return;
new_y = cursor.y() - cursorRow()->baseline();
}
}
- bv()->screen().draw(bv()->text, bv(), new_y);
+ //bv()->screen().draw(bv()->text, bv(), new_y);
RowList::iterator next_row = boost::next(cursorRow());
if (next_row != rows().end()) {
bv->update(this, BufferView::UPDATE);
cursorPrevious();
finishChange(bv, false);
- // was:
- // finishUndo();
- // moveCursorUpdate(bv, false, false);
- // owner_->view_state_changed();
break;
case LFUN_NEXT:
if (bv->theLockingInset()) {
InsetOld * tli = bv->theLockingInset();
LyXCursor cursor = bv->text->cursor;
- LyXFont font = bv->text->getFont(bv->buffer(),
- cursor.par(), cursor.pos());
+ LyXFont font = bv->text->getFont(cursor.par(), cursor.pos());
int width = tli->width();
int inset_x = font.isVisibleRightToLeft()
? cursor.ix() - width : cursor.ix();
if (!bv->text->selection.set())
bv->update(BufferView::UPDATE);
bv->text->setSelection();
- bv->screen().toggleToggle(bv->text, bv);
+ bv->repaint();
bv->fitCursor();
break;
}