]> git.lyx.org Git - features.git/commitdiff
Do not substract cursors pos from two different cells (fix assertion while doing...
authorJuergen Spitzmueller <spitz@lyx.org>
Mon, 31 Mar 2014 16:33:53 +0000 (18:33 +0200)
committerRichard Heck <rgheck@lyx.org>
Fri, 18 Apr 2014 14:52:48 +0000 (10:52 -0400)
Fixes: #7944.(cherry picked from commit f6138ed02f47b8bbe65d3245f9e92686dc24296c)
src/lyxfind.cpp
status.21x

index ca43d47e92b0ac708d550bce79a0f140822022ac..b30c0694e1bf56bea1cdb82ac4877db8551c4c0e 100644 (file)
@@ -1377,7 +1377,8 @@ static void findAdvReplace(BufferView * bv, FindAndReplaceOptions const & opt, M
        DocIterator sel_beg = cur.selectionBegin();
        DocIterator sel_end = cur.selectionEnd();
        if (&sel_beg.inset() != &sel_end.inset()
-           || sel_beg.pit() != sel_end.pit())
+           || sel_beg.pit() != sel_end.pit()
+           || sel_beg.idx() != sel_end.idx())
                return;
        int sel_len = sel_end.pos() - sel_beg.pos();
        LYXERR(Debug::FIND, "sel_beg: " << sel_beg << ", sel_end: " << sel_end
index d2605f176d61d45ef73a82f6a0dfe400dd6d439c..add6a75c58a29708e7afaa658c2fa28ced09de3e 100644 (file)
@@ -70,6 +70,9 @@ What's new
 
 - Fix assertion when entering a path into the import dialog (bug 7437).
 
+- Fix assertion when doing advanced replace with table cells selected (bug
+  7944).
+
 - Failed instant preview compilation now returns an error. And a red box is 
   drawn around very small preview imagines, so they can be seen (bug 7522).