]> git.lyx.org Git - features.git/commitdiff
Skip insets when checking for uncodable chars to paste.
authorJuergen Spitzmueller <spitz@lyx.org>
Sat, 17 Feb 2018 11:27:26 +0000 (12:27 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Sun, 18 Feb 2018 07:49:15 +0000 (08:49 +0100)
Fixes paste of quote insets to ERT/chunk.

(cherry picked from commit 8f9b733e6720c0709ea25c4bf56847e01faadd6f)

src/CutAndPaste.cpp

index f611d59395b8b9681b5a0d20c89435f1c684c52e..7c158453eec512f7d9744fe98d1874237fa673a8 100644 (file)
@@ -168,6 +168,9 @@ pasteSelectionHelper(DocIterator const & cur, ParagraphList const & parlist,
                for (size_t i = 0; i != insertion.size(); ++i) {
                        pos_type end = insertion[i].size();
                        for (pos_type j = 0; j != end; ++j) {
+                               // skip insets
+                               if (insertion[i].isInset(j))
+                                       continue;
                                char_type const c = insertion[i].getChar(j);
                                if (!e->encodable(c)) {
                                        // do not track deletion