if (bv_->text() == 0)
resizeCurrentBuffer();
- // FIXME: needed when ?
- fitCursor();
-
// Buffer-dependent dialogs should be updated or
// hidden. This should go here because some dialogs (eg ToC)
// require bv_->text.
bool BufferView::Pimpl::fitCursor()
{
- lyxerr << "BufferView::Pimpl::fitCursor." << endl;
if (screen().fitCursor(bv_)) {
updateScrollbar();
return true;
if (inset) {
res = inset->dispatch(cur, cmd);
} else {
- res = cur.innerText()->dispatch(cur, cmd);
+ res = bv_->text()->dispatch(cur, cmd);
}
- if (bv_->fitCursor() || res.update()) {
+ if (fitCursor() || res.update()) {
bv_->update();
cur.updatePos();
}
screen().hideCursor();
- // either the inset under the cursor or the surrounding LyXText will
- // handle this event.
+ // either the inset under the cursor or the
+ // surrounding LyXText will handle this event.
// built temporary path to inset
LyXText * text = bv_->text();
// if it wishes to do so.
DispatchResult res = cur.dispatch(cmd);
- if (bv_->fitCursor() || res.update())
+ if (fitCursor() || res.update())
bv_->update();
// see workAreaKeyPress
cur.clearSelection();
bv_->update();
cur.resetAnchor();
- cmd.message(N_("Mark off"));
+ cur.message(N_("Mark off"));
break;
case LFUN_MARK_ON:
cur.mark() = true;
bv_->update();
cur.resetAnchor();
- cmd.message(N_("Mark on"));
+ cur.message(N_("Mark on"));
break;
case LFUN_SETMARK:
cur.clearSelection();
if (cur.mark()) {
- cmd.message(N_("Mark removed"));
+ cur.message(N_("Mark removed"));
} else {
cur.mark() = true;
- cmd.message(N_("Mark set"));
+ cur.message(N_("Mark set"));
}
cur.resetAnchor();
bv_->update();
break;
case LFUN_UNKNOWN_ACTION:
- cmd.errorMessage(N_("Unknown function!"));
+ cur.errorMessage(N_("Unknown function!"));
break;
default:
- return cur.dispatch(cmd).dispatched();
+ return false;
}
return true;