[LyX/master] Properly fix broken cursor (part of #12134)

Juergen Spitzmueller spitz at lyx.org
Thu Feb 11 13:50:47 UTC 2021


commit 59bead6dfabc52750fd9ffe31b9553a257cbbdd0
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Thu Feb 11 14:53:02 2021 +0100

    Properly fix broken cursor (part of #12134)
---
 src/insets/InsetTabular.cpp |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp
index 715fa6e..7c340b0 100644
--- a/src/insets/InsetTabular.cpp
+++ b/src/insets/InsetTabular.cpp
@@ -5308,8 +5308,7 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
 			if (insertPlaintextString(cur.bv(), clip, false)) {
 				// content has been replaced,
 				// so cursor might be invalid
-				cur.pos() = cur.lastpos();
-				cur.pit() = cur.lastpit();
+				cur.fixIfBroken();
 				bvcur.setCursor(cur);
 				break;
 			}


More information about the lyx-cvs mailing list