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

Juergen Spitzmueller spitz at lyx.org
Mon Mar 23 16:05:12 UTC 2020


commit cca83a320b00325debdf9c0b37feb1ae11ad5993
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
    
    (cherry picked from commit 7b3404fcab0e2530964444261d411814c03eaeba)
---
 src/Text.cpp |    4 ++--
 status.23x   |    2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/Text.cpp b/src/Text.cpp
index 2d916c8..6e81268 100644
--- a/src/Text.cpp
+++ b/src/Text.cpp
@@ -866,8 +866,8 @@ void Text::insertStringAsLines(Cursor & cur, docstring const & str,
 				++pos;
 				space_inserted = true;
 			}
-		} else if (!isPrintable(*cit)) {
-			// Ignore unprintables
+		} else if (!isPrintable(*cit) && *cit != 0x200c) {
+			// Ignore unprintables, except for ZWNJ (0x200c)
 			continue;
 		} else {
 			// just insert the character
diff --git a/status.23x b/status.23x
index cf3a793..d33f221 100644
--- a/status.23x
+++ b/status.23x
@@ -78,6 +78,8 @@ What's new
 
 - Fix over-hasty resetting of dialog in Child Documents settings (bug 11564).
 
+- Fix problems when pasting ZERO WIDTH NON-JOINER (bug 11790).
+
 
 * INTERNALS
 


More information about the lyx-cvs mailing list