/** kept to send setMouseHover(false).
* Not owned, so don't delete.
*/
- Inset * last_inset_;
+ Inset const * last_inset_;
/// are we hovering something that we can click
bool clickable_inset_;
void BufferView::bookmarkEditPosition()
{
+ d->cursor_.markEditPosition();
// Don't eat cpu time for each keystroke
if (d->cursor_.paragraph().id() == d->bookmark_edit_position_)
return;
if (cur.inset().lyxCode() == CAPTION_CODE)
return cur.inset().getStatus(cur, cmd, flag);
// FIXME we should consider passthru paragraphs too.
- flag.setEnabled(!cur.inset().getLayout().isPassThru());
+ flag.setEnabled(!(cur.inTexted() && cur.paragraph().isPassThru()));
break;
case LFUN_CITATION_INSERT: {
}
default:
- dispatched = false;
+ // OK, so try the Buffer itself...
+ buffer_.dispatch(cmd, dr);
+ dispatched = dr.dispatched();
break;
}
buffer_.undo().endUndoGroup();
dr.dispatched(dispatched);
- return;
}
d->last_inset_ = 0;
}
- // const_cast because of setMouseHover().
- Inset * inset = const_cast<Inset *>(covering_inset);
- if (inset && inset->setMouseHover(this, true)) {
+ if (covering_inset && covering_inset->setMouseHover(this, true)) {
need_redraw = true;
// Only the insets that accept the hover state, do
// clear the last_inset_, so only set the last_inset_
// member if the hovered setting is accepted.
- d->last_inset_ = inset;
+ d->last_inset_ = covering_inset;
}
if (need_redraw) {
TextMetrics & BufferView::textMetrics(Text const * t)
{
+ LASSERT(t, /**/);
TextMetricsCache::iterator tmc_it = d->text_metrics_.find(t);
if (tmc_it == d->text_metrics_.end()) {
tmc_it = d->text_metrics_.insert(
}
+void BufferView::resetInlineCompletionPos()
+{
+ d->inlineCompletionPos_ = DocIterator();
+}
+
+
bool samePar(DocIterator const & a, DocIterator const & b)
{
if (a.empty() && b.empty())