From 7f3407b89ac19f32e5a7af8f46de7b247d82a48e Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Fri, 4 Jan 2019 13:57:13 +0100 Subject: [PATCH 1/1] 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) --- src/BufferView.cpp | 2 ++ status.23x | 2 ++ 2 files changed, 4 insertions(+) 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 -- 2.39.2