mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-14 21:09:05 +08:00
Merge pull request #4573 from RaiKoHoff/Dev_Master
Minor changes for Unicode Point display
This commit is contained in:
commit
7274da2eb5
@ -69,7 +69,7 @@ SettingsVersion=5
|
||||
;HyperlinkShellExURLCmdLnArgs="${URL}" (use ${URL} as place holder for clicked Hyperlink URL string)
|
||||
;HyperlinkFileProtocolVerb="" (ShellExecuteEx()::lpVerb (""=default, "edit", "explore", "find", "open", "print", "properties", "runas")
|
||||
[Statusbar Settings]
|
||||
;VisibleSections=0 1 12 14 2 4 5 6 7 8 9 10 11
|
||||
;VisibleSections=0 1 12 15 14 2 4 5 6 7 8 9 10 11
|
||||
;SectionPrefixes=Ln ,Col ,Sel ,Sb ,SLn ,Occ ,,,,,,,Ch ,Repl ,Eval ,U+,
|
||||
;SectionPostfixes=,,,,,,,,,,,,,,,,
|
||||
;SectionWidthSpecs=30 20 20 20 20 20 0 0 0 0 0 0 20 20 20
|
||||
|
||||
@ -490,7 +490,7 @@ If used, this setting also defines the field ordering.
|
||||
- Section 12 = Character Count (per line)
|
||||
- Section 13 = Replaced Occurrences
|
||||
- Section 14 = TinyExpr Evaluation
|
||||
- Section 15 = Unicode point display of current (caret pos) character.
|
||||
- Section 15 = Unicode point display (UTF-16 encoding) of current (caret pos) character.
|
||||
|
||||
#### `SectionPrefixes=Ln ,Col ,Sel ,Sb ,SLn ,Occ ,,,,,,,Ch ,Repl ,Eval ,U+,` (internal default)
|
||||
|
||||
@ -502,7 +502,7 @@ This parameter is used to redefines the displayed Prefixes in the sections of th
|
||||
This parameter is used to redefines the displayed Postfixes in the sections of the Status Bar
|
||||
- A “,” (comma) is used as separator. Spaces are **NOT** ignored.
|
||||
|
||||
#### `SectionWidthSpecs=30 20 20 20 20 20 0 0 0 0 0 0 20 20 20` (internal default)
|
||||
#### `SectionWidthSpecs=30 20 20 20 20 20 20 0 0 0 0 0 0 20 20 20` (internal default)
|
||||
|
||||
This parameter is used to define the relative width of each field of the Status Bar
|
||||
- 0 = space optimized fit to text (dynamically adapted to width changes)
|
||||
|
||||
@ -10062,18 +10062,19 @@ static void _UpdateStatusbarDelayed(bool bForceRedraw)
|
||||
|
||||
if (g_iStatusbarVisible[STATUS_UNICODEPT]) {
|
||||
|
||||
static WCHAR tchChr[32] = { L'\0' };
|
||||
static unsigned s_wChr = L'\0';
|
||||
int const len = sizeof(int) / sizeof(WCHAR);
|
||||
static WCHAR tchChr[32] = { L'\0' };
|
||||
static UINT64 s_wChr = L'\0';
|
||||
static int const len = sizeof(UINT64) / sizeof(WCHAR);
|
||||
|
||||
DocPos const iPosAfter = SciCall_PositionAfter(iPos);
|
||||
int const chrLen = (int)(iPosAfter - iPos);
|
||||
|
||||
char chChrs[8] = { '\0' };
|
||||
struct Sci_TextRangeFull tr = { { iPos, iPosAfter }, chChrs };
|
||||
SciCall_GetTextRangeFull(&tr);
|
||||
|
||||
unsigned wChr = L'\0';
|
||||
MultiByteToWideChar(Encoding_SciCP, 0, chChrs, (int)strlen(chChrs), (LPWSTR)&wChr, len);
|
||||
UINT64 wChr = L'\0';
|
||||
MultiByteToWideChar(Encoding_SciCP, 0, chChrs, chrLen, (LPWSTR)&wChr, len);
|
||||
|
||||
if (bForceRedraw || (s_wChr != wChr)) {
|
||||
if (wChr <= 0xFFFF)
|
||||
|
||||
@ -237,7 +237,7 @@ typedef enum STATUS_SECTOR_T {
|
||||
#define SBS_INIT_ZERO { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
|
||||
#define SBS_INIT_MINUS { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }
|
||||
|
||||
#define STATUSBAR_DEFAULT_IDS L"0 1 12 16 14 2 4 5 6 7 8 9 10 11"
|
||||
#define STATUSBAR_DEFAULT_IDS L"0 1 12 15 14 2 4 5 6 7 8 9 10 11"
|
||||
#define STATUSBAR_SECTION_WIDTH_SPECS L"30 20 20 20 20 20 20 0 0 0 0 0 0 20 20 20"
|
||||
#define STAUSBAR_RIGHT_MARGIN 20
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user