From: Juergen Spitzmueller Date: Mon, 13 Jan 2020 08:48:56 +0000 (+0100) Subject: Fix backspace deletion of selected items with change tracking X-Git-Tag: 2.3.5~109 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=81af6062cb41d2cb703e70d7dd3902e292fa28eb;p=features.git Fix backspace deletion of selected items with change tracking Move cursor at beginning of selection after deletion. Else backspace operation gets stuck in a loop (tries to remove the selection again and again). This also fixes backspace deletion of insets with confirmDeletion() == true. Fixes #11630 (cherry picked from commit adfd38e4efd1180df164fa2c75cf15210f366e94) --- diff --git a/src/Text3.cpp b/src/Text3.cpp index 393b556ad7..70646036ed 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -1193,7 +1193,13 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd) } } } else { + DocIterator const dit = cur.selectionBegin(); cutSelection(cur, false); + if (cur.buffer()->params().track_changes) + // since we're doing backwards deletion, + // and the selection is not really cut, + // move cursor before selection (#11630) + cur.setCursor(dit); singleParUpdate = false; } break; diff --git a/status.23x b/status.23x index 7b2e2a9886..63ad41d0a7 100644 --- a/status.23x +++ b/status.23x @@ -52,6 +52,8 @@ What's new * USER INTERFACE +- Fix backspace deletion of selected items with change tracking (bug 11630). + - Fix display glith where the change tracking cue blinks with the cursor (bug 11684).