hello,

the attached patch fixes bug 4301:
in fact BufferView::moveToPosition(..) failed for every position inside an inset because buffer_->text() was used instead of cursor_.text() to set the current font.

ok, jürgen?

bernhard
Index: src/BufferView.cpp
===================================================================
--- src/BufferView.cpp  (revision 21421)
+++ src/BufferView.cpp  (working copy)
@@ -546,7 +546,7 @@
                                        break;
                                }
                        setCursor(dit);
-                       buffer_->text().setCurrentFont(cursor_);
+                       cursor_.text()->setCurrentFont(cursor_);
                        // Note: return bottom (document) level pit.
                        return boost::make_tuple(cursor_.bottom().pit(), 
cursor_.bottom().pos(), top_id);
                }
@@ -562,7 +562,7 @@
                it.pit() = bottom_pit;
                it.pos() = min(bottom_pos, it.paragraph().size());
                setCursor(it);
-               buffer_->text().setCurrentFont(cursor_);
+               cursor_.text()->setCurrentFont(cursor_);
                return boost::make_tuple(it.pit(), it.pos(),
                                         it.paragraph().id());
        }

Reply via email to