X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ftext3.C;h=a468a7289665a3590980354f8cc5dc346177fa62;hb=eead5ba43d0ddf06544ad1b40063981d3788c635;hp=647ccbb0ebf564c0346662d78e456deb5f14d6a3;hpb=80d7f70dc340e8b1ab29d38284b8327d13757196;p=lyx.git diff --git a/src/text3.C b/src/text3.C index 647ccbb0eb..a468a72896 100644 --- a/src/text3.C +++ b/src/text3.C @@ -72,7 +72,7 @@ namespace { if (lt->isInInset()) bv->updateInset(lt->inset_owner); else - bv->toggleToggle(); + bv->repaint(); } if (!lt->isInInset()) { bv->update(lt, BufferView::SELECT); @@ -97,7 +97,7 @@ namespace { // 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(); @@ -114,7 +114,7 @@ namespace { // 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() @@ -249,11 +249,8 @@ void LyXText::cursorPrevious() 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; } @@ -270,9 +267,6 @@ void LyXText::cursorPrevious() 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() @@ -690,10 +684,6 @@ InsetOld::RESULT LyXText::dispatch(FuncRequest const & cmd) bv->update(this, BufferView::UPDATE); cursorPrevious(); finishChange(bv, false); - // was: - // finishUndo(); - // moveCursorUpdate(bv, false, false); - // owner_->view_state_changed(); break; case LFUN_NEXT: @@ -1296,8 +1286,7 @@ InsetOld::RESULT LyXText::dispatch(FuncRequest const & cmd) 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(); @@ -1341,7 +1330,7 @@ InsetOld::RESULT LyXText::dispatch(FuncRequest const & cmd) if (!bv->text->selection.set()) bv->update(BufferView::UPDATE); bv->text->setSelection(); - bv->screen().toggleToggle(bv->text, bv); + bv->repaint(); bv->fitCursor(); break; }