aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Editor.cxx12
-rw-r--r--src/Indicator.h3
-rw-r--r--src/ViewStyle.cxx3
3 files changed, 16 insertions, 2 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 2a1018252..addfedf6e 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -2356,7 +2356,7 @@ void Editor::DrawIndicators(Surface *surface, ViewStyle &vsDraw, int line, int x
}
for (Decoration *deco=pdoc->decorations.root; deco; deco = deco->next) {
- if (under == (deco->indicator >= 16)) {
+ if (under == vsDraw.indicators[deco->indicator].under) {
int startPos = posLineStart + subLineStart;
if (!deco->rs.ValueAt(startPos)) {
startPos = deco->rs.EndRun(startPos);
@@ -7138,6 +7138,16 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
case SCI_INDICGETFORE:
return (wParam <= INDIC_MAX) ? vs.indicators[wParam].fore.desired.AsLong() : 0;
+ case SCI_INDICSETUNDER:
+ if (wParam <= INDIC_MAX) {
+ vs.indicators[wParam].under = lParam != 0;
+ InvalidateStyleRedraw();
+ }
+ break;
+
+ case SCI_INDICGETUNDER:
+ return (wParam <= INDIC_MAX) ? vs.indicators[wParam].under : 0;
+
case SCI_SETINDICATORCURRENT:
pdoc->decorations.SetCurrentIndicator(wParam);
break;
diff --git a/src/Indicator.h b/src/Indicator.h
index 716db1051..cebc22d80 100644
--- a/src/Indicator.h
+++ b/src/Indicator.h
@@ -13,8 +13,9 @@
class Indicator {
public:
int style;
+ bool under;
ColourPair fore;
- Indicator() : style(INDIC_PLAIN), fore(ColourDesired(0,0,0)) {
+ Indicator() : style(INDIC_PLAIN), under(false), fore(ColourDesired(0,0,0)) {
}
void Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine);
};
diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx
index 403d17a3a..6611439f5 100644
--- a/src/ViewStyle.cxx
+++ b/src/ViewStyle.cxx
@@ -129,10 +129,13 @@ void ViewStyle::Init() {
ResetDefaultStyle();
indicators[0].style = INDIC_SQUIGGLE;
+ indicators[0].under = false;
indicators[0].fore = ColourDesired(0, 0x7f, 0);
indicators[1].style = INDIC_TT;
+ indicators[1].under = false;
indicators[1].fore = ColourDesired(0, 0, 0xff);
indicators[2].style = INDIC_PLAIN;
+ indicators[2].under = false;
indicators[2].fore = ColourDesired(0xff, 0, 0);
lineHeight = 1;