mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-14 21:09:05 +08:00
+fix: representation of EOLs in case of GDI technology (use default)
This commit is contained in:
parent
2cbcc8715d
commit
40e44f3f44
@ -2529,13 +2529,6 @@ static void _InitializeSciEditCtrl(HWND hwndEditCtrl)
|
||||
SciCall_SetMarginOptions(SC_MARGINOPTION_SUBLINESELECT);
|
||||
|
||||
// Nonprinting characters
|
||||
SciCall_SetRepresentation("\r", "\xE2\x86\x90");
|
||||
SciCall_SetRepresentationAppearance("\r", SC_REPRESENTATION_COLOUR);
|
||||
SciCall_SetRepresentation("\n", "\xE2\x86\x93");
|
||||
SciCall_SetRepresentationAppearance("\n", SC_REPRESENTATION_COLOUR);
|
||||
SciCall_SetRepresentation("\r\n", "\xE2\x86\xB2"); // "\xE2\xAE\x92"
|
||||
SciCall_SetRepresentationAppearance("\r\n", SC_REPRESENTATION_COLOUR);
|
||||
/// (!) -> SciCall_SetRepresentationColour() in Styles.c
|
||||
SciCall_SetViewWS(Settings.ViewWhiteSpace ? SCWS_VISIBLEALWAYS : SCWS_INVISIBLE);
|
||||
SciCall_SetViewEOL(Settings.ViewEOLs);
|
||||
|
||||
@ -6399,7 +6392,7 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
|
||||
Settings.Bidirectional = SciCall_GetBidirectional();
|
||||
|
||||
if ((prevRT != Settings.RenderingTechnology) || (prevBD != Settings.Bidirectional)) {
|
||||
UpdateMargins(true);
|
||||
Style_ResetCurrentLexer(Globals.hwndEdit);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@ -204,6 +204,7 @@ DeclareSciCallV01(GetPunctuationChars, GETPUNCTUATIONCHARS, char*, ptxt);
|
||||
DeclareSciCallV2(SetRepresentation, SETREPRESENTATION, const char*, encChar, const char*, represent);
|
||||
DeclareSciCallV2(SetRepresentationColour, SETREPRESENTATIONCOLOUR, const char*, encChar, COLORALPHAREF, colour);
|
||||
DeclareSciCallV2(SetRepresentationAppearance, SETREPRESENTATIONAPPEARANCE, const char*, encChar, int, appear);
|
||||
DeclareSciCallV0(ClearAllRepresentations, CLEARALLREPRESENTATIONS);
|
||||
|
||||
// Document Pointer Handling
|
||||
DeclareSciCallR0(GetDocPointer, GETDOCPOINTER, sptr_t);
|
||||
|
||||
13
src/Styles.c
13
src/Styles.c
@ -1533,6 +1533,19 @@ void Style_SetLexer(HWND hwnd, PEDITLEXER pLexNew)
|
||||
//@@@SciCall_SetWhiteSpaceSize(MulDiv(iValue, SciCall_GetZoom(), 100)); // needs update on zoom
|
||||
SciCall_SetWhiteSpaceSize(iValue);
|
||||
|
||||
// Nonprinting characters
|
||||
if (SciCall_GetTechnology() == SC_TECHNOLOGY_DEFAULT) {
|
||||
SciCall_ClearAllRepresentations();
|
||||
}
|
||||
else {
|
||||
SciCall_SetRepresentation("\r", "\xE2\x86\x90");
|
||||
SciCall_SetRepresentationAppearance("\r", SC_REPRESENTATION_COLOUR);
|
||||
SciCall_SetRepresentation("\n", "\xE2\x86\x93");
|
||||
SciCall_SetRepresentationAppearance("\n", SC_REPRESENTATION_COLOUR);
|
||||
SciCall_SetRepresentation("\r\n", "\xE2\x86\xB2"); // "\xE2\xAE\x92"
|
||||
SciCall_SetRepresentationAppearance("\r\n", SC_REPRESENTATION_COLOUR);
|
||||
}
|
||||
|
||||
// whitespace colors
|
||||
rgb = RGB(0, 0, 0);
|
||||
rgbWrt = rgb;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user