#include "bufferparams.h"
#include "BufferView.h"
#include "debug.h"
+#include "dispatchresult.h"
#include "factory.h"
#include "funcrequest.h"
#include "gettext.h"
return;
}
- setCursorFromCoordinates(cursor.x_fix(), y);
+ setCursorFromCoordinates(bv()->x_target(), y);
finishUndo();
if (crit == bv()->text->cursorRow()) {
Row const & rr = *getRowNearY(y, dummypit);
y = dummypit->y + rr.y_offset();
- setCursorFromCoordinates(cursor.x_fix(), y);
+ setCursorFromCoordinates(bv()->x_target(), y);
// + bv->workHeight());
finishUndo();
} // anon namespace
-dispatch_result LyXText::dispatch(FuncRequest const & cmd)
+DispatchResult LyXText::dispatch(FuncRequest const & cmd)
{
lyxerr[Debug::ACTION] << "LyXText::dispatch: action[" << cmd.action
<<"] arg[" << cmd.argument << ']' << "xy[" <<
if (cursor.pos() == 0
&& !(params.spaceTop() == VSpace (VSpace::NONE))) {
setParagraph(
- params.lineTop(),
- params.lineBottom(),
- params.pagebreakTop(),
- params.pagebreakBottom(),
VSpace(VSpace::NONE),
params.spaceBottom(),
params.spacing(),
ParagraphParameters & params = cursorPar()->params();
if (cursor.pos() == 0 && !(params.spaceTop() == VSpace(VSpace::NONE))) {
setParagraph(
- params.lineTop(),
- params.lineBottom(),
- params.pagebreakTop(),
- params.pagebreakBottom(),
VSpace(VSpace::NONE),
params.spaceBottom(),
params.spacing(),
ParagraphParameters & params = getPar(cur)->params();
if (params.spaceTop() == VSpace(VSpace::NONE)) {
setParagraph(
- params.lineTop(),
- params.lineBottom(),
- params.pagebreakTop(),
- params.pagebreakBottom(),
VSpace(VSpace::DEFSKIP), params.spaceBottom(),
params.spacing(),
params.align(),
case LFUN_BEGINNINGBUFSEL:
if (inset_owner)
- return UNDISPATCHED;
+ return DispatchResult(false);
cursorTop();
finishChange(bv, true);
break;
case LFUN_ENDBUFSEL:
if (inset_owner)
- return UNDISPATCHED;
+ return DispatchResult(false);
cursorBottom();
finishChange(bv, true);
break;
bv->text->setCursorFromCoordinates(x, y + screen_first);
finishUndo();
bv->text->selection.cursor = bv->text->cursor;
- bv->text->cursor.x_fix(bv->text->cursor.x());
+ bv->x_target(bv->text->cursor.x());
if (bv->fitCursor())
selection_possible = false;
case LFUN_INDEX_PRINT:
case LFUN_TOC_INSERT:
case LFUN_HFILL:
+ case LFUN_INSERT_LINE:
+ case LFUN_INSERT_PAGEBREAK:
// do nothing fancy
doInsertInset(this, cmd, false, false);
break;
break;
default:
- return UNDISPATCHED;
+ return DispatchResult(false);
}
- return DISPATCHED;
+ return DispatchResult(true, true);
}