Jürgen Spitzmüller wrote:
Bo Peng wrote:
Open the attached lyx file, move cursor to the end of the second line
(actually anywhere with pos > length of previous line). Edit ->
paragraph up, lyx crashes.

fix attached.

No, my patch is the right fix and I am responsible for this: in rev 19040, I eagerly erased two lines (++cur.pit() and --cur.pit()).

Abdel.
Index: Text3.cpp
===================================================================
--- Text3.cpp   (revision 19064)
+++ Text3.cpp   (working copy)
@@ -377,6 +377,7 @@
                std::swap(pars_[pit], pars_[pit + 1]);
                updateLabels(cur.buffer());
                needsUpdate = true;
+               ++cur.pit();
                break;
        }
 
@@ -386,6 +387,7 @@
                finishUndo();
                std::swap(pars_[pit], pars_[pit - 1]);
                updateLabels(cur.buffer());
+               --cur.pit();
                needsUpdate = true;
                break;
        }

Reply via email to