From 65b340d7adcfa82eb45155fe274e564dfe55adbc Mon Sep 17 00:00:00 2001 From: Rainer Kottenhoff Date: Tue, 12 Dec 2017 11:28:00 +0100 Subject: [PATCH] + fix: last hyperlink was restyled to lexer's style (not desired hotspot style) --- src/Edit.c | 2 ++ src/Notepad3.c | 4 ++-- src/Styles.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Edit.c b/src/Edit.c index 82fe0e3ab..9bb16ddd3 100644 --- a/src/Edit.c +++ b/src/Edit.c @@ -5831,6 +5831,8 @@ void EditUpdateUrlHotspots(HWND hwnd, int startPos, int endPos, BOOL bActiveHots } while (start < end); + SciCall_StartStyling(endPos); + if (bActiveHotspot) UpdateEditWndUI(); else diff --git a/src/Notepad3.c b/src/Notepad3.c index c49c3cc49..4edb8ffa4 100644 --- a/src/Notepad3.c +++ b/src/Notepad3.c @@ -5670,7 +5670,7 @@ LRESULT MsgNotify(HWND hwnd,WPARAM wParam,LPARAM lParam) case SCN_SAVEPOINTREACHED: bModified = FALSE; UpdateToolbar(); - //EditUpdateUrlHotspots(hwndEdit, 0, SciCall_GetTextLength()); + EditUpdateUrlHotspots(hwndEdit, 0, SciCall_GetTextLength(), bHyperlinkHotspot); break; case SCN_MARGINCLICK: @@ -5686,7 +5686,7 @@ LRESULT MsgNotify(HWND hwnd,WPARAM wParam,LPARAM lParam) case SCN_SAVEPOINTLEFT: bModified = TRUE; UpdateToolbar(); - //EditUpdateUrlHotspots(hwndEdit, 0, SciCall_GetTextLength()); + EditUpdateUrlHotspots(hwndEdit, 0, SciCall_GetTextLength(), bHyperlinkHotspot); break; } break; diff --git a/src/Styles.c b/src/Styles.c index 9553e9ee9..0a201871e 100644 --- a/src/Styles.c +++ b/src/Styles.c @@ -3557,7 +3557,7 @@ void Style_SetLexer(HWND hwnd, PEDITLEXER pLexNew) { // apply lexer styles SendMessage(hwnd, SCI_COLOURISE, 0, (LPARAM)-1); - // override hyperlink hotspot style + // override lexer style by hyperlink hotspot style Style_SetUrlHotSpot(hwnd, bHyperlinkHotspot); EditUpdateUrlHotspots(hwnd, 0, SciCall_GetTextLength(), bHyperlinkHotspot);