break;
case LFUN_CHAR_FORWARD:
- cur.updateFlags(Update::FitCursor);
+ // FIXME: we have to enable full redraw here because of the
+ // visual box corners that define the inset. If we know for
+ // sure that we stay within the same cell we can optimize for
+ // that using:
+ //cur.updateFlags(Update::FitCursor);
case LFUN_CHAR_FORWARD_SELECT:
cur.selHandle(cmd.action == LFUN_CHAR_FORWARD_SELECT);
cur.autocorrect() = false;
break;
case LFUN_CHAR_BACKWARD:
- cur.updateFlags(Update::FitCursor);
+ // FIXME: we have to enable full redraw here because of the
+ // visual box corners that define the inset. If we know for
+ // sure that we stay within the same cell we can optimize for
+ // that using:
+ //cur.updateFlags(Update::FitCursor);
case LFUN_CHAR_BACKWARD_SELECT:
cur.selHandle(cmd.action == LFUN_CHAR_BACKWARD_SELECT);
cur.autocorrect() = false;
break;
case LFUN_UP:
- cur.updateFlags(Update::FitCursor);
+ // FIXME: we have to enable full redraw here because of the
+ // visual box corners that define the inset. If we know for
+ // sure that we stay within the same cell we can optimize for
+ // that using:
+ //cur.updateFlags(Update::FitCursor);
case LFUN_UP_SELECT:
// FIXME Tried to use clearTargetX and macroModeClose, crashed on cur.up()
if (cur.inMacroMode()) {
break;
case LFUN_DOWN:
- cur.updateFlags(Update::FitCursor);
+ // FIXME: we have to enable full redraw here because of the
+ // visual box corners that define the inset. If we know for
+ // sure that we stay within the same cell we can optimize for
+ // that using:
+ //cur.updateFlags(Update::FitCursor);
case LFUN_DOWN_SELECT:
if (cur.inMacroMode()) {
cur.macroModeClose();
case LFUN_PARAGRAPH_UP:
case LFUN_PARAGRAPH_DOWN:
- cur.updateFlags(Update::FitCursor);
+ // FIXME: we have to enable full redraw here because of the
+ // visual box corners that define the inset. If we know for
+ // sure that we stay within the same cell we can optimize for
+ // that using:
+ //cur.updateFlags(Update::FitCursor);
case LFUN_PARAGRAPH_UP_SELECT:
case LFUN_PARAGRAPH_DOWN_SELECT:
break;
case LFUN_LINE_BEGIN:
case LFUN_WORD_BACKWARD:
- cur.updateFlags(Update::FitCursor);
+ // FIXME: we have to enable full redraw here because of the
+ // visual box corners that define the inset. If we know for
+ // sure that we stay within the same cell we can optimize for
+ // that using:
+ //cur.updateFlags(Update::FitCursor);
case LFUN_LINE_BEGIN_SELECT:
case LFUN_WORD_BACKWARD_SELECT:
cur.selHandle(cmd.action == LFUN_WORD_BACKWARD_SELECT ||
case LFUN_WORD_FORWARD:
case LFUN_LINE_END:
- cur.updateFlags(Update::FitCursor);
+ // FIXME: we have to enable full redraw here because of the
+ // visual box corners that define the inset. If we know for
+ // sure that we stay within the same cell we can optimize for
+ // that using:
+ //cur.updateFlags(Update::FitCursor);
case LFUN_WORD_FORWARD_SELECT:
case LFUN_LINE_END_SELECT:
cur.selHandle(cmd.action == LFUN_WORD_FORWARD_SELECT ||
break;
case LFUN_CELL_FORWARD:
- cur.updateFlags(Update::FitCursor);
+ // FIXME: we have to enable full redraw here because of the
+ // visual box corners that define the inset. If we know for
+ // sure that we stay within the same cell we can optimize for
+ // that using:
+ //cur.updateFlags(Update::FitCursor);
cur.inset().idxNext(cur);
break;
case LFUN_CELL_BACKWARD:
- cur.updateFlags(Update::FitCursor);
+ // FIXME: we have to enable full redraw here because of the
+ // visual box corners that define the inset. If we know for
+ // sure that we stay within the same cell we can optimize for
+ // that using:
+ //cur.updateFlags(Update::FitCursor);
cur.inset().idxPrev(cur);
break;
if (cmd.button() == mouse_button::button1) {
//lyxerr << "## lfunMousePress: setting cursor to: " << cur << endl;
bv.mouseSetCursor(cur);
- cur.noUpdate();
+ // FIXME: we have to enable full redraw here because of the
+ // visual box corners that define the inset.
+ //cur.noUpdate();
} else if (cmd.button() == mouse_button::button2) {
MathArray ar;
if (cur.selection())
if (cmd.button() == mouse_button::button1) {
//theSelection().put(cur.grabSelection());
- cur.noUpdate();
+ if (!cur.selection())
+ cur.noUpdate();
return;
}
// it is better than nothing...
if (!cur.pos() != 0 || cur.prevAtom()->getChar() != ' ') {
cur.insert(c);
- cur.updateFlags(Update::SinglePar | Update::FitCursor);
+ // FIXME: we have to enable full redraw here because of the
+ // visual box corners that define the inset. If we know for
+ // sure that we stay within the same cell we can optimize for
+ // that using:
+ //cur.updateFlags(Update::SinglePar | Update::FitCursor);
}
return true;
}
if (cur.pos() != 0 && cur.prevAtom()->asSpaceInset()) {
cur.prevAtom().nucleus()->asSpaceInset()->incSpace();
- cur.updateFlags(Update::SinglePar | Update::FitCursor);
+ // FIXME: we have to enable full redraw here because of the
+ // visual box corners that define the inset. If we know for
+ // sure that we stay within the same cell we can optimize for
+ // that using:
+ //cur.updateFlags(Update::SinglePar | Update::FitCursor);
return true;
}
if (cur.popRight()) {
- cur.updateFlags(Update::FitCursor);
+ // FIXME: we have to enable full redraw here because of the
+ // visual box corners that define the inset. If we know for
+ // sure that we stay within the same cell we can optimize for
+ // that using:
+ //cur.updateFlags(Update::FitCursor);
return true;
}
- cur.updateFlags(Update::FitCursor);
// if we are at the very end, leave the formula
return cur.pos() != cur.lastpos();
}