]> git.lyx.org Git - features.git/commitdiff
revert hazardous part of r26957 and add a comment, take 3.
authorAbdelrazak Younes <younes@lyx.org>
Tue, 28 Oct 2008 18:00:21 +0000 (18:00 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Tue, 28 Oct 2008 18:00:21 +0000 (18:00 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27171 a592a061-630c-0410-9148-cb99ea01b6c8

src/lyxfind.cpp

index fbb515ba39991461de42b3b10b9e0b4acc15dda4..bc1f037e7ac9c8137dc6cde349fa5a02182f6cf5 100644 (file)
@@ -157,9 +157,9 @@ int replaceAll(BufferView * bv,
        Cursor cur(*bv);
        cur.setCursor(doc_iterator_begin(buf.inset()));
        while (findForward(cur, match, false)) {
-               pos_type pos = cur.pos();
-               Font const & font
-                       = cur.paragraph().getFontSettings(buf.params(), pos);
+               // Backup current cursor position and font.
+               pos_type const pos = cur.pos();
+               Font const font = cur.paragraph().getFontSettings(buf.params(), pos);
                cur.recordUndo();
                int striked = ssize - cur.paragraph().eraseChars(pos, pos + ssize,
                                                            buf.params().trackChanges);