From 3b0d5242acd23b4a727560ea98139cc5f4a8b88a Mon Sep 17 00:00:00 2001 From: Don Ho Date: Thu, 28 Apr 2022 02:22:07 +0200 Subject: [PATCH] Fix unfocused selected text background color changed problem Ref: https://github.com/notepad-plus-plus/notepad-plus-plus/pull/11419#issuecomment-1094362796 Fix #11595, close #11601 --- PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp index 55b88d859..a4db57136 100644 --- a/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp @@ -2593,6 +2593,7 @@ void ScintillaEditView::performGlobalStyles() selectColorFore = pStyle->_fgColor; } execute(SCI_SETSELBACK, 1, selectColorBack); + execute(SCI_SETELEMENTCOLOUR, SC_ELEMENT_SELECTION_INACTIVE_BACK, selectColorBack); if (nppParams.isSelectFgColorEnabled()) execute(SCI_SETSELFORE, 1, selectColorFore);