From: Jean-Marc Lasgouttes Date: Fri, 4 Jan 2019 12:57:13 +0000 (+0100) Subject: Avoid crash when using inset-select-all in tabular X-Git-Tag: 2.3.3~62 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=7f3407b89ac19f32e5a7af8f46de7b247d82a48e;hp=e73c0d6387f0be4b1d5e3a47e0b6d29585c52cbc;p=lyx.git Avoid crash when using inset-select-all in tabular When changing cell idx, it is important to set the pit to a reasonable value. (cherry picked from commit a69e01d0b47aebbdfc3139533fcb7f1d0c04f156) --- diff --git a/src/BufferView.cpp b/src/BufferView.cpp index 66278e0985..6b3a528f48 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -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 diff --git a/status.23x b/status.23x index baee939f05..b8e5306df0 100644 --- a/status.23x +++ b/status.23x @@ -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