aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Editor.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 1a0248522..3504c4d35 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -7320,7 +7320,9 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
case SCI_SETCARETLINEBACKALPHA: {
const Layer layerNew = (wParam == SC_ALPHA_NOALPHA) ? Layer::base : Layer::over;
vs.caretLine.layer = layerNew;
- vs.SetElementAlpha(SC_ELEMENT_CARET_LINE_BACK, static_cast<int>(wParam));
+ if (vs.ElementColour(SC_ELEMENT_CARET_LINE_BACK)) {
+ vs.SetElementAlpha(SC_ELEMENT_CARET_LINE_BACK, static_cast<int>(wParam));
+ }
InvalidateStyleRedraw();
}
break;