From dc99ce103550a3441f474b44c0a4075af3ed41ba Mon Sep 17 00:00:00 2001 From: ozone10 Date: Mon, 6 Feb 2023 08:30:20 +0100 Subject: [PATCH] Make Non-Print Characters show by default Add NEL and ALM to NPC, and add note to not translate npc custom color stylename. Close #13063 --- PowerEditor/installer/nativeLang/english.xml | 2 ++ PowerEditor/src/Parameters.cpp | 2 +- PowerEditor/src/ScintillaComponent/ScintillaEditView.h | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/PowerEditor/installer/nativeLang/english.xml b/PowerEditor/installer/nativeLang/english.xml index 5655c73bd..eabf1399e 100644 --- a/PowerEditor/installer/nativeLang/english.xml +++ b/PowerEditor/installer/nativeLang/english.xml @@ -1667,6 +1667,8 @@ U+FEFF : zero-width no-break space For the full list check User Manual. Click on "?" button on right to open website with User Manual." /> + + diff --git a/PowerEditor/src/Parameters.cpp b/PowerEditor/src/Parameters.cpp index b2422c38a..38dc6568c 100644 --- a/PowerEditor/src/Parameters.cpp +++ b/PowerEditor/src/Parameters.cpp @@ -6333,7 +6333,7 @@ void NppParameters::feedScintillaParam(TiXmlNode *node) } // Unicode non-printable characters visibility State - _svp._npcShow = parseShowHideBoolAttribute(TEXT("npcShow")); + _svp._npcShow = parseShowHideBoolAttribute(TEXT("npcShow"), true); nm = element->Attribute(TEXT("npcMode"), &val); if (nm) diff --git a/PowerEditor/src/ScintillaComponent/ScintillaEditView.h b/PowerEditor/src/ScintillaComponent/ScintillaEditView.h index 75e63b027..3afca465a 100644 --- a/PowerEditor/src/ScintillaComponent/ScintillaEditView.h +++ b/PowerEditor/src/ScintillaComponent/ScintillaEditView.h @@ -122,7 +122,9 @@ const int MARK_HIDELINESUNDERLINE = 17; const std::vector> g_nonPrintingChars = { + {"\xC2\x85", "NEL", "U+0085"}, // U+0085 : next line {"\xC2\xA0", "NBSP", "U+00A0"}, // U+00A0 : no-break space + {"\xD8\x9C", "ALM", "U+061C"}, // U+061C : arabic letter mark {"\xE1\x9A\x80", "OSPM", "U+1680"}, // U+1680 : ogham space mark {"\xE1\xA0\x8E", "MVS", "U+180E"}, // U+180E : mongolian vowel separator {"\xE2\x80\x80", "NQSP", "U+2000"}, // U+2000 : en quad