]> git.lyx.org Git - lyx.git/commitdiff
Avoid crash when using inset-select-all in tabular
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 4 Jan 2019 12:57:13 +0000 (13:57 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sat, 5 Jan 2019 13:56:41 +0000 (14:56 +0100)
When changing cell idx, it is important to set the pit to a reasonable
value.

(cherry picked from commit a69e01d0b47aebbdfc3139533fcb7f1d0c04f156)

src/BufferView.cpp
status.23x

index 66278e09854a85cd315b48cb21fa1b77ab75f251..6b3a528f483a164fdeaea66e2e3594421a37c189 100644 (file)
@@ -1889,10 +1889,12 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
                        // At least one complete cell is selected and inset is a table.
                        // Select all cells
                        cur.idx() = 0;
+                       cur.pit() = 0;
                        cur.pos() = 0;
                        cur.resetAnchor();
                        cur.selection(true);
                        cur.idx() = cur.lastidx();
+                       cur.pit() = cur.lastpit();
                        cur.pos() = cur.lastpos();
                } else {
                        // select current cell
index baee939f05417873c42b052dc5fe00cb856f239d..b8e5306df070d6f94a6cdf662095d1be3b767bef 100644 (file)
@@ -117,6 +117,8 @@ What's new
 
 - Fix cases where text is offset vertically (bug 10532, 10767).
 
+- Fix crash when using inset-select-all in tabular.
+
 
 * INTERNALS