From 9cf05effff0adee0644994bc3ab1f726b678cf4c Mon Sep 17 00:00:00 2001 From: Rainer Kottenhoff Date: Sun, 26 May 2019 19:42:47 +0200 Subject: [PATCH] + fix: updates for Hyperlink Indicator --- Versions/build.txt | 2 +- res/Notepad3.exe.manifest.conf | 2 +- src/Edit.c | 2 -- src/Notepad3.c | 16 ++++++++-------- src/Styles.c | 4 +++- src/VersionEx.h | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Versions/build.txt b/Versions/build.txt index 57bf58ca8..54c9fc81b 100644 --- a/Versions/build.txt +++ b/Versions/build.txt @@ -1 +1 @@ -1727 +1728 diff --git a/res/Notepad3.exe.manifest.conf b/res/Notepad3.exe.manifest.conf index 2d6824b78..fb9499ac2 100644 --- a/res/Notepad3.exe.manifest.conf +++ b/res/Notepad3.exe.manifest.conf @@ -3,7 +3,7 @@ Notepad3 RC diff --git a/src/Edit.c b/src/Edit.c index 82e318496..2a8ca6f62 100644 --- a/src/Edit.c +++ b/src/Edit.c @@ -4399,7 +4399,6 @@ void EditSetSelectionEx(HWND hwnd, DocPos iAnchorPos, DocPos iCurrentPos, DocPos // remember x-pos for moving caret vertically SciCall_ChooseCaretX(); - UpdateVisibleUrlIndics(); UpdateToolbar(); UpdateStatusbar(false); } @@ -6910,7 +6909,6 @@ void EditHideNotMarkedLineRange(HWND hwnd, bool bHideLines) Style_SetFolding(hwnd, FocusedView.CodeFoldingAvailable && FocusedView.ShowCodeFolding); Sci_ApplyLexerStyle(0, -1); EditMarkAllOccurrences(hwnd, true); - UpdateVisibleUrlIndics(); } else // ===== fold lines without marker ===== { diff --git a/src/Notepad3.c b/src/Notepad3.c index e5d4e8df5..7f73b9508 100644 --- a/src/Notepad3.c +++ b/src/Notepad3.c @@ -1326,7 +1326,7 @@ LRESULT CALLBACK MainWndProc(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam) // update Scintilla colors case WM_SYSCOLORCHANGE: - UpdateVisibleUrlIndics(); + EditUpdateUrlIndicators(Globals.hwndEdit, 0, -1, Settings.HyperlinkHotspot); MarkAllOccurrences(0, true); UpdateAllBars(false); return DefWindowProc(hwnd,umsg,wParam,lParam); @@ -2299,7 +2299,8 @@ LRESULT MsgDPIChanged(HWND hwnd, WPARAM wParam, LPARAM lParam) SendWMSize(hwnd, rc); UpdateUI(); - UpdateVisibleUrlIndics(); + EditUpdateUrlIndicators(Globals.hwndEdit, 0, -1, Settings.HyperlinkHotspot); + MarkAllOccurrences(0, true); UpdateAllBars(false); return 0; @@ -2360,9 +2361,9 @@ LRESULT MsgThemeChanged(HWND hwnd, WPARAM wParam ,LPARAM lParam) SendWMSize(hwnd, NULL); - if (FocusedView.HideNonMatchedLines) { EditToggleView(Globals.hwndEdit); } - UpdateVisibleUrlIndics(); + EditUpdateUrlIndicators(Globals.hwndEdit, 0, -1, Settings.HyperlinkHotspot); MarkAllOccurrences(0, true); + if (FocusedView.HideNonMatchedLines) { EditToggleView(Globals.hwndEdit); } UpdateUI(); UpdateAllBars(false); @@ -3562,7 +3563,6 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam) } _OBSERVE_NOTIFY_CHANGE_; EndWaitCursor(); - UpdateVisibleUrlIndics(); UpdateStatusbar(false); } break; @@ -4972,7 +4972,6 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam) case IDM_VIEW_TOGGLE_VIEW: if (FocusedView.HideNonMatchedLines) { EditToggleView(Globals.hwndEdit); - UpdateVisibleUrlIndics(); MarkAllOccurrences(0, true); } else { @@ -5057,7 +5056,7 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam) case IDM_VIEW_HYPERLINKHOTSPOTS: Settings.HyperlinkHotspot = !Settings.HyperlinkHotspot; - UpdateVisibleUrlIndics(); + EditUpdateUrlIndicators(Globals.hwndEdit, 0, -1, Settings.HyperlinkHotspot); break; case IDM_VIEW_ZOOMIN: @@ -6655,6 +6654,7 @@ static LRESULT _MsgNotifyFromEdit(HWND hwnd, const LPNMHDR pnmh, const SCNotific MarkAllOccurrences(Settings2.UpdateDelayMarkAllOccurrences, false); } } + if (Settings.HyperlinkHotspot) { UpdateVisibleUrlIndics(); } @@ -6730,6 +6730,7 @@ static LRESULT _MsgNotifyFromEdit(HWND hwnd, const LPNMHDR pnmh, const SCNotific DocLn const iFirstLine = SciCall_LineFromPosition((DocPos)scn->position); DocLn const iLastLine = SciCall_LineFromPosition((DocPos)(scn->position + scn->length - 1)); for (DocLn i = iFirstLine; i <= iLastLine; ++i) { SciCall_EnsureVisible(i); } + UpdateVisibleUrlIndics(); } break; @@ -9922,7 +9923,6 @@ bool FileLoad(bool bDontSave, bool bNew, bool bReload, //bReadOnly = false; _SetSaveNeededFlag(bReload); - UpdateVisibleUrlIndics(); UpdateAllBars(true); // consistent settings file handling (if loaded in editor) diff --git a/src/Styles.c b/src/Styles.c index ecff7c5fb..440fa3213 100644 --- a/src/Styles.c +++ b/src/Styles.c @@ -1426,8 +1426,10 @@ void Style_SetLexer(HWND hwnd, PEDITLEXER pLexNew) // apply lexer styles Sci_ApplyLexerStyle(0, -1); + EditUpdateUrlIndicators(Globals.hwndEdit, 0, -1, Settings.HyperlinkHotspot); + if (bFocusedView) { EditToggleView(Globals.hwndEdit); } - UpdateVisibleUrlIndics(); + UpdateAllBars(false); } diff --git a/src/VersionEx.h b/src/VersionEx.h index fac593428..12fae1618 100644 --- a/src/VersionEx.h +++ b/src/VersionEx.h @@ -8,7 +8,7 @@ #define VERSION_MAJOR 5 #define VERSION_MINOR 19 #define VERSION_REV 526 -#define VERSION_BUILD 1727 +#define VERSION_BUILD 1728 #define SCINTILLA_VER 415+ #define ONIGMO_REGEX_VER 6.2.0 #define VERSION_PATCH RC