From 660284011776830a4f483ceeadf244dd5522d7f9 Mon Sep 17 00:00:00 2001 From: Udo Hoffmann Date: Thu, 11 Jun 2020 01:32:22 +0200 Subject: [PATCH] Fix block selection cursor position after TAB Fix #8400, close #8402 --- PowerEditor/src/Notepad_plus.cpp | 6 ++++-- PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 0909720c..590a37c4 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -2456,8 +2456,10 @@ void Notepad_plus::addHotSpot(ScintillaEditView* view) int urlAction = (NppParameters::getInstance()).getNppGUI()._styleURL; LPARAM indicStyle = (urlAction == 2) ? INDIC_PLAIN : INDIC_HIDDEN; - pView->execute(SCI_INDICSETSTYLE, URL_INDIC, indicStyle); - pView->execute(SCI_INDICSETHOVERSTYLE, URL_INDIC, INDIC_FULLBOX); + + LPARAM indicStyleCur = pView->execute(SCI_INDICGETSTYLE, URL_INDIC); + if (indicStyleCur != indicStyle) + pView->execute(SCI_INDICSETSTYLE, URL_INDIC, indicStyle); int startPos = 0; int endPos = -1; diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp index 1de04b90..4d8ed439 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp @@ -329,6 +329,8 @@ void ScintillaEditView::init(HINSTANCE hInst, HWND hPere) execute(SCI_INDICSETUNDER, SCE_UNIVERSAL_FOUND_STYLE_EXT4, true); execute(SCI_INDICSETUNDER, SCE_UNIVERSAL_FOUND_STYLE_EXT5, true); + execute(SCI_INDICSETHOVERSTYLE, URL_INDIC, INDIC_FULLBOX); + _codepage = ::GetACP(); ::SetWindowLongPtr(_hSelf, GWLP_USERDATA, reinterpret_cast(this));