From cca83a320b00325debdf9c0b37feb1ae11ad5993 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Sun, 22 Mar 2020 11:07:57 +0100 Subject: [PATCH] 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 2d916c834b..6e81268cae 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 cf3a79311f..d33f2219d7 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 -- 2.39.5