diff --git a/language/common_res.h b/language/common_res.h index e6015d95e..f86af4cf0 100644 --- a/language/common_res.h +++ b/language/common_res.h @@ -927,5 +927,7 @@ #define IDS_LEX_STR_63349 63349 #define IDS_LEX_STR_63350 63350 #define IDS_LEX_STR_63351 63351 +#define IDS_LEX_STR_63352 63352 +#define IDS_LEX_STR_63353 63353 #endif //_COMMON_RES_H_ diff --git a/language/np3_af_za/lexer_af_za.rc b/language/np3_af_za/lexer_af_za.rc index 3961710aa..2a82faa8a 100644 Binary files a/language/np3_af_za/lexer_af_za.rc and b/language/np3_af_za/lexer_af_za.rc differ diff --git a/language/np3_de_de/lexer_de_de.rc b/language/np3_de_de/lexer_de_de.rc index 8ab2de343..e99714f9d 100644 Binary files a/language/np3_de_de/lexer_de_de.rc and b/language/np3_de_de/lexer_de_de.rc differ diff --git a/language/np3_en_gb/lexer_en_gb.rc b/language/np3_en_gb/lexer_en_gb.rc index 857f8bf7d..fac51ee73 100644 Binary files a/language/np3_en_gb/lexer_en_gb.rc and b/language/np3_en_gb/lexer_en_gb.rc differ diff --git a/language/np3_en_us/lexer_en_us.rc b/language/np3_en_us/lexer_en_us.rc index bd86276f6..03173aced 100644 Binary files a/language/np3_en_us/lexer_en_us.rc and b/language/np3_en_us/lexer_en_us.rc differ diff --git a/language/np3_es_es/lexer_es_es.rc b/language/np3_es_es/lexer_es_es.rc index 6300d251d..52e859db4 100644 Binary files a/language/np3_es_es/lexer_es_es.rc and b/language/np3_es_es/lexer_es_es.rc differ diff --git a/language/np3_fr_fr/lexer_fr_fr.rc b/language/np3_fr_fr/lexer_fr_fr.rc index f8d7bbada..a7fc4b7ed 100644 Binary files a/language/np3_fr_fr/lexer_fr_fr.rc and b/language/np3_fr_fr/lexer_fr_fr.rc differ diff --git a/language/np3_ja_jp/lexer_ja_jp.rc b/language/np3_ja_jp/lexer_ja_jp.rc index 21cb18850..cffa2e9b3 100644 Binary files a/language/np3_ja_jp/lexer_ja_jp.rc and b/language/np3_ja_jp/lexer_ja_jp.rc differ diff --git a/language/np3_nl_nl/lexer_nl_nl.rc b/language/np3_nl_nl/lexer_nl_nl.rc index 386527fea..1e40b53cd 100644 Binary files a/language/np3_nl_nl/lexer_nl_nl.rc and b/language/np3_nl_nl/lexer_nl_nl.rc differ diff --git a/language/np3_zh_cn/lexer_zh_cn.rc b/language/np3_zh_cn/lexer_zh_cn.rc index 15dfddd0d..2a257ae7a 100644 Binary files a/language/np3_zh_cn/lexer_zh_cn.rc and b/language/np3_zh_cn/lexer_zh_cn.rc differ diff --git a/src/Edit.c b/src/Edit.c index 10cbbed30..3640ab61d 100644 --- a/src/Edit.c +++ b/src/Edit.c @@ -6773,7 +6773,7 @@ void EditUpdateUrlHotspots(HWND hwnd, DocPos startPos, DocPos endPos, bool bActi // mark this match SciCall_StartStyling(iPos); if (bActiveHotspot) - SciCall_SetStyling((DocPosCR)mlen, (char)Style_GetHotspotStyleID()); + SciCall_SetStyling((DocPosCR)mlen, Style_GetHotspotStyleID()); else EditFinalizeStyling(hwnd, endPos); @@ -6852,7 +6852,7 @@ void EditHideNotMarkedLineRange(HWND hwnd, DocPos iStartPos, DocPos iEndPos, boo const DocPos begPos = SciCall_PositionFromLine(iStartLine); const DocPos lnLen = SciCall_LineLength(iStartLine); SciCall_StartStyling(begPos); - SciCall_SetStyling((DocPosCR)lnLen, (char)Style_GetInvisibleStyleID()); + SciCall_SetStyling((DocPosCR)lnLen, Style_GetInvisibleStyleID()); } int level = baseLevel; @@ -6868,7 +6868,7 @@ void EditHideNotMarkedLineRange(HWND hwnd, DocPos iStartPos, DocPos iEndPos, boo const DocPos begPos = SciCall_PositionFromLine(iLine); const DocPos lnLen = SciCall_LineLength(iLine); SciCall_StartStyling(begPos); - SciCall_SetStyling((DocPosCR)lnLen, (char)Style_GetInvisibleStyleID()); + SciCall_SetStyling((DocPosCR)lnLen, Style_GetInvisibleStyleID()); if (level == baseLevel) { SciCall_SetFoldLevel(iLine - 1, SC_FOLDLEVELHEADERFLAG | level++); diff --git a/src/Notepad3.c b/src/Notepad3.c index 7fce86305..3fb0bdcfe 100644 --- a/src/Notepad3.c +++ b/src/Notepad3.c @@ -5925,7 +5925,7 @@ void OpenHotSpotURL(DocPos position, bool bForceBrowser) { char const cStyle = SciCall_GetStyleAt(position); - if (cStyle != (char)Style_GetHotspotStyleID()) { return; } + if ((int)cStyle != Style_GetHotspotStyleID()) { return; } if (!SciCall_StyleGetHotspot(Style_GetHotspotStyleID())) { return; } // get left most position of style diff --git a/src/SciCall.h b/src/SciCall.h index b79e6eb70..af4a0b406 100644 --- a/src/SciCall.h +++ b/src/SciCall.h @@ -326,7 +326,7 @@ DeclareSciCallV1(SetWrapMode, SETWRAPMODE, int, mode) DeclareSciCallR1(StyleGetFore, STYLEGETFORE, COLORREF, char, style) DeclareSciCallR1(StyleGetBack, STYLEGETBACK, COLORREF, char, style) DeclareSciCallR1(GetStyleAt, GETSTYLEAT, char, DocPos, position) -DeclareSciCallV2(SetStyling, SETSTYLING, DocPosCR, length, char, style) +DeclareSciCallV2(SetStyling, SETSTYLING, DocPosCR, length, int, style) DeclareSciCallV1(StartStyling, STARTSTYLING, DocPos, position) DeclareSciCallR0(GetEndStyled, GETENDSTYLED, DocPos) DeclareSciCallR1(StyleGetHotspot, STYLEGETHOTSPOT, bool, int, iStyle) diff --git a/src/Styles.c b/src/Styles.c index 8a5ecef64..010ffb470 100644 --- a/src/Styles.c +++ b/src/Styles.c @@ -75,32 +75,6 @@ bool ChooseFontDirectWrite(HWND hwnd, const WCHAR* localeName, UINT dpi, LPCHOOS // ---------------------------------------------------------------------------- - -typedef enum { - STY_DEFAULT = 0, - STY_MARGIN = 1, - STY_BRACE_OK = 2, - STY_BRACE_BAD = 3, - STY_CTRL_CHR = 4, - STY_INDENT_GUIDE = 5, - STY_SEL_TXT = 6, - STY_WHITESPACE = 7, - STY_CUR_LN_BCK = 8, - STY_CARET = 9, - STY_LONG_LN_MRK = 10, - STY_X_LN_SPACE = 11, - STY_BOOK_MARK = 12, - STY_MARK_OCC = 13, - STY_URL_HOTSPOT = 14, - STY_INVISIBLE = 15, - STY_READONLY = 16 - - // MAX = 127 -} -LexDefaultStyles; - - - // This array holds all the lexers... // Don't forget to change the number of the lexer for HTML and XML // in Notepad2.c ParseCommandLine() if you change this array! @@ -758,6 +732,20 @@ void Style_SetLexer(HWND hwnd, PEDITLEXER pLexNew) } SendMessage(hwnd, SCI_INDICSETSTYLE, INDIC_NP3_MARK_OCCURANCE, iValue); + + // Inline-IME Color + #define _SC_INDIC_IME_INPUT (INDIC_IME + 0) + #define _SC_INDIC_IME_TARGET (INDIC_IME + 1) + #define _SC_INDIC_IME_CONVERTED (INDIC_IME + 2) + #define _SC_INDIC_IME_UNKNOWN INDIC_IME_MAX + + if (Style_StrGetColor(true, pCurrentStandard->Styles[STY_IME_COLOR].szValue, &dColor)) { // IME foregr + SendMessage(hwnd, SCI_INDICSETFORE, _SC_INDIC_IME_INPUT, dColor); + SendMessage(hwnd, SCI_INDICSETFORE, _SC_INDIC_IME_TARGET, dColor); + SendMessage(hwnd, SCI_INDICSETFORE, _SC_INDIC_IME_CONVERTED, dColor); + SendMessage(hwnd, SCI_INDICSETFORE, _SC_INDIC_IME_UNKNOWN, dColor); + } + // More default values... if (pLexNew != &lexANSI) { @@ -1064,16 +1052,6 @@ void Style_SetLexer(HWND hwnd, PEDITLEXER pLexNew) -//============================================================================= -// -// Style_GetHotspotStyleID() -// -int Style_GetHotspotStyleID() -{ - return (STYLE_MAX - STY_URL_HOTSPOT); -} - - //============================================================================= // // Style_SetUrlHotSpot() @@ -1120,16 +1098,6 @@ void Style_SetUrlHotSpot(HWND hwnd, bool bHotSpot) } -//============================================================================= -// -// Style_GetInvisibleStyleID() -// -int Style_GetInvisibleStyleID() -{ - //return STYLE_FOLDDISPLAYTEXT; - return (STYLE_MAX - STY_INVISIBLE); -} - //============================================================================= // @@ -1145,17 +1113,6 @@ void Style_SetInvisible(HWND hwnd, bool bInvisible) } - -//============================================================================= -// -// Style_GetReadonlyStyleID() -// -int Style_GetReadonlyStyleID() -{ - return (STYLE_MAX - STY_READONLY); -} - - //============================================================================= // // Style_SetInvisible() diff --git a/src/Styles.h b/src/Styles.h index 08b605a4d..92bf95e47 100644 --- a/src/Styles.h +++ b/src/Styles.h @@ -82,9 +82,6 @@ INT_PTR CALLBACK Styles_ConfigDlgProc(HWND,UINT,WPARAM,LPARAM); HWND Style_CustomizeSchemesDlg(HWND); INT_PTR CALLBACK Style_SelectLexerDlgProc(HWND,UINT,WPARAM,LPARAM); void Style_SelectLexerDlg(HWND); -int Style_GetHotspotStyleID(); -int Style_GetInvisibleStyleID(); -int Style_GetReadonlyStyleID(); bool Style_StrGetWeightValue(LPCWSTR,int*); void Style_AppendWeightStr(LPWSTR, int, int);