We were doing this on every mouse movement. I.e., for every single
pixel the mouse traverses. It can be expensive if there are a lot
of math insets.
// LFUN_FILE_OPEN generated by drag-and-drop.
FuncRequest cmd = cmd0;
- Cursor old = cursor();
- Cursor cur(*this);
- cur.push(buffer_.inset());
- cur.selection(d->cursor_.selection());
-
// Either the inset under the cursor or the
// surrounding Text will handle this event.
return;
}
+ Cursor old = cursor();
+ Cursor cur(*this);
+ cur.push(buffer_.inset());
+ cur.selection(d->cursor_.selection());
+
// Build temporary cursor.
Inset * inset = d->text_metrics_[&buffer_.text()].editXY(cur, cmd.x(), cmd.y());
if (inset) {