[LyX/master] Don't omit ZERO WIDTH NON-JOINER on clipboard paste

Juergen Spitzmueller spitz at lyx.org
Sun Mar 22 09:49:09 UTC 2020


commit 7b3404fcab0e2530964444261d411814c03eaeba
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Sun Mar 22 11:07:57 2020 +0100

    Don't omit ZERO WIDTH NON-JOINER on clipboard paste
    
    Fixes #11790
---
 src/Text.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Text.cpp b/src/Text.cpp
index 1087330..25ce684 100644
--- a/src/Text.cpp
+++ b/src/Text.cpp
@@ -895,8 +895,8 @@ void Text::insertStringAsLines(Cursor & cur, docstring const & str,
 				++pos;
 				space_inserted = true;
 			}
-		} else if (!isPrintable(ch)) {
-			// Ignore unprintables
+		} else if (!isPrintable(ch) && ch != 0x200c) {
+			// Ignore unprintables, except for ZWNJ (0x200c)
 			continue;
 		} else {
 			// just insert the character


More information about the lyx-cvs mailing list