#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[" <<
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;
break;
default:
- return UNDISPATCHED;
+ return DispatchResult(false);
}
- return DISPATCHED;
+ return DispatchResult(true, true);
}