Permalink
Browse files

Add LS and PS in Unicode Control Character list.

  • Loading branch information...
zufuliu committed Oct 14, 2018
1 parent 9c2ed7c commit 0c8d0130176953581b8d997bb87e600be8f19947
Showing with 12 additions and 1 deletion.
  1. +2 −0 scintilla/scripts/GenerateCharTable.py
  2. +4 −1 src/Edit.c
  3. +2 −0 src/Notepad2.c
  4. +2 −0 src/Notepad2.rc
  5. +2 −0 src/resource.h
@@ -97,6 +97,8 @@ def GenerateUnicodeControlCharacters():
"\u206C", # U+206C IAFS Inhibit Arabic form shaping
"\u001E", # U+001E RS Record Separator (Block separator)
"\u001F", # U+001F US Unit Separator (Segment separator)
"\u2028", # U+2028 LS Line Separator
"\u2029", # U+2029 PS Paragraph Separator
]
print('UnicodeControlCharacters:')
@@ -6035,6 +6035,7 @@ typedef struct UnicodeControlCharacter {
LPCSTR representation;
} UnicodeControlCharacter;
// https://en.wikipedia.org/wiki/Unicode_control_characters
// scintilla/scripts/GenerateCharTable.py
static const UnicodeControlCharacter kUnicodeControlCharacterTable[] = {
{ "\xe2\x80\x8e", "LRM" }, // U+200E LRM Left-to-right mark
@@ -6052,9 +6053,11 @@ static const UnicodeControlCharacter kUnicodeControlCharacterTable[] = {
{ "\xe2\x81\xaa", "ISS" }, // U+206A ISS Inhibit symmetric swapping
{ "\xe2\x81\xad", "AAFS" }, // U+206D AAFS Activate Arabic form shaping
{ "\xe2\x81\xac", "IAFS" }, // U+206C IAFS Inhibit Arabic form shaping
// built-in C0 control set
// Scintilla built-in, Editor::SetRepresentations()
{ "\x1e", NULL }, // U+001E RS Record Separator (Block separator)
{ "\x1f", NULL }, // U+001F US Unit Separator (Segment separator)
{ "\xe2\x80\xa8", NULL }, // U+2028 LS Line Separator
{ "\xe2\x80\xa9", NULL }, // U+2029 PS Unit Separator (Segment separator)
};
void EditInsertUnicodeControlCharacter(HWND hwnd, int menu) {
@@ -3311,6 +3311,8 @@ LRESULT MsgCommand(HWND hwnd, WPARAM wParam, LPARAM lParam) {
case IDM_INSERT_UNICODE_IAFS:
case IDM_INSERT_UNICODE_RS:
case IDM_INSERT_UNICODE_US:
case IDM_INSERT_UNICODE_LS:
case IDM_INSERT_UNICODE_PS:
EditInsertUnicodeControlCharacter(hwndEdit, LOWORD(wParam));
break;
@@ -267,6 +267,8 @@ BEGIN
MENUITEM "IAFS\tInhibit Arabic form s&haping", IDM_INSERT_UNICODE_IAFS
MENUITEM "RS\tRecord Separator (&Block separator)", IDM_INSERT_UNICODE_RS
MENUITEM "US\tUnit Separator (&Segment separator)", IDM_INSERT_UNICODE_US
MENUITEM "LS\tLine Separator", IDM_INSERT_UNICODE_LS
MENUITEM "PS\tParagraph Separator", IDM_INSERT_UNICODE_PS
END
MENUITEM SEPARATOR
MENUITEM "&File Name", CMD_INSERTFILENAME_NOEXT
@@ -255,6 +255,8 @@
#define IDM_INSERT_UNICODE_IAFS 40274
#define IDM_INSERT_UNICODE_RS 40275
#define IDM_INSERT_UNICODE_US 40276
#define IDM_INSERT_UNICODE_LS 40277
#define IDM_INSERT_UNICODE_PS 40278
#define IDM_EDIT_UNDO 40300 // Alt+Back Ctrl+Z Ctrl+Shift+Y
#define IDM_EDIT_REDO 40301 // Ctrl+Y Ctrl+Shift+Z
#define IDM_EDIT_CUT 40302 // Ctrl+X Shift+Del

0 comments on commit 0c8d013

Please sign in to comment.