]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.cpp
Fix build with GNU libstdc++ C++11 ABI
[lyx.git] / src / BufferView.cpp
index 77750d87e3111e898f2f4ad8948e6b507f153e70..8a947c169fb12e30e80f6aff2bd8065a0406cd69 100644 (file)
@@ -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;