// if this is a multicell selection, we just set the cursor to
// the beginning of the cell's text.
if (bvcur.selIsMultiCell()) {
- bvcur.pit() = 0;
- bvcur.pos() = 0;
+ bvcur.pit() = bvcur.lastpit();
+ bvcur.pos() = bvcur.lastpos();
}
}
break;
cmd = FuncRequest(LFUN_FINISHED_FORWARD);
cur.undispatched();
}
+ if (cur.selIsMultiCell()) {
+ cur.pit() = cur.lastpit();
+ cur.pos() = cur.lastpos();
+ return;
+ }
break;
case LFUN_UP_SELECT:
cmd = FuncRequest(LFUN_UP);
cur.undispatched();
}
+ if (cur.selIsMultiCell()) {
+ cur.pit() = cur.lastpit();
+ cur.pos() = cur.lastpos();
+ return;
+ }
break;
// case LFUN_SCREEN_DOWN: {
cell(cur.idx())->dispatch(cur, cmd);
break;
+ case LFUN_SELF_INSERT:
+ if (cur.selIsMultiCell()) {
+ cur.recordUndoInset(DELETE_UNDO);
+ cutSelection(cur);
+ }
+ cell(cur.idx())->dispatch(cur, cmd);
+ break;
+
case LFUN_CHAR_DELETE_BACKWARD:
case LFUN_CHAR_DELETE_FORWARD:
if (cur.selIsMultiCell()) {
return;
++cur.idx();
}
+
+ cur.boundary(false);
+
+ if (cur.selIsMultiCell()) {
+ cur.pit() = cur.lastpit();
+ cur.pos() = cur.lastpos();
+ resetPos(cur);
+ return;
+ }
+
cur.pit() = 0;
cur.pos() = 0;
- cur.boundary(false);
// in visual mode, place cursor at extreme left or right
return;
--cur.idx();
}
+
+ if (cur.selIsMultiCell()) {
+ cur.pit() = cur.lastpit();
+ cur.pos() = cur.lastpos();
+ resetPos(cur);
+ return;
+ }
+
cur.pit() = cur.lastpit();
cur.pos() = cur.lastpos();