]> git.lyx.org Git - lyx.git/blobdiff - src/CutAndPaste.cpp
revert hazardous part of r26957 and add a comment.
[lyx.git] / src / CutAndPaste.cpp
index 2f1a715d084608ac194fb568e9c93e73cc3a3f72..5a0ecbb09c393f0942930834a7fcdd32aa1075af 100644 (file)
@@ -914,8 +914,8 @@ void replaceSelectionWithString(Cursor & cur, docstring const & str, bool backwa
        cur.recordUndo();
        DocIterator selbeg = cur.selectionBegin();
 
-       // Get font setting before we cut
-       Font const font =
+       // Get font setting before we cut, we need a copy here, not a bare reference.
+       Font const font =
                selbeg.paragraph().getFontSettings(cur.buffer().params(), selbeg.pos());
 
        // Insert the new string