X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FBufferView.cpp;h=8a947c169fb12e30e80f6aff2bd8065a0406cd69;hb=51cc8aa9f6b784f806b1d9cc97fe0749ffac29af;hp=77750d87e3111e898f2f4ad8948e6b507f153e70;hpb=67e6c45f80cd743dc88cd35749c2cd160f5dded6;p=lyx.git diff --git a/src/BufferView.cpp b/src/BufferView.cpp index 77750d87e3..8a947c169f 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -1748,6 +1748,8 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr) Cursor old = cur; bool const in_texted = cur.inTexted(); cur.setCursor(doc_iterator_begin(cur.buffer())); + if (cur != old) + notifyCursorLeavesOrEnters(old, cur); cur.selHandle(false); buffer_.changed(true); updateHoveredInset(); @@ -3000,7 +3002,7 @@ void BufferView::checkCursorScrollOffset(PainterInfo & pi) // Horizontal scroll offset of the cursor row in pixels int offset = d->horiz_scroll_offset_; - int const MARGIN = Length(2, Length::EM).inPixels(workWidth()); + int const MARGIN = Length(2, Length::EM).inPixels(pi.base); if (cur_x < offset + MARGIN) { // scroll right offset = cur_x - MARGIN;