]> git.lyx.org Git - lyx.git/blobdiff - src/Text3.cpp
Replace the hardcoded TEXT_TO_INSET_OFFSET by tunable values
[lyx.git] / src / Text3.cpp
index aba73974defc1cb0649643f55eace38926fd25e9..8643411da1cf0d695fc5c04fd478ccc84afb6cfc 100644 (file)
@@ -581,7 +581,6 @@ Language const * getLanguage(Cursor const & cur, string const & lang)
 docstring resolveLayout(docstring layout, DocIterator const & dit)
 {
        Paragraph const & par = dit.paragraph();
-       docstring const old_layout = par.layout().name();
        DocumentClass const & tclass = dit.buffer()->params().documentClass();
 
        if (layout.empty())
@@ -1251,7 +1250,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;