commit 7f3407b89ac19f32e5a7af8f46de7b247d82a48e
Author: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date:   Fri Jan 4 13:57:13 2019 +0100

    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(+), 0 deletions(-)

diff --git a/src/BufferView.cpp b/src/BufferView.cpp
index 66278e0..6b3a528 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 baee939..b8e5306 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
 

Reply via email to