diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Editor.cxx | 23 | ||||
-rw-r--r-- | src/ViewStyle.cxx | 2 | ||||
-rw-r--r-- | src/ViewStyle.h | 1 |
3 files changed, 26 insertions, 0 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index bcaa8f839..b2d29da13 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -2273,6 +2273,21 @@ void Editor::DrawEOL(Surface *surface, ViewStyle &vsDraw, PRectangle rcLine, Lin surface->FillRectangle(rcSegment, vsDraw.styles[STYLE_DEFAULT].back.allocated); } + if (vsDraw.selEOLFilled && eolInSelection && vsDraw.selbackset && (line < pdoc->LinesTotal() - 1) && (vsDraw.selAlpha == SC_ALPHA_NOALPHA)) { + surface->FillRectangle(rcSegment, SelectionBackground(vsDraw)); + } else { + if (overrideBackground) { + surface->FillRectangle(rcSegment, background); + } else if (vsDraw.styles[ll->styles[ll->numCharsInLine] & styleMask].eolFilled) { + surface->FillRectangle(rcSegment, vsDraw.styles[ll->styles[ll->numCharsInLine] & styleMask].back.allocated); + } else { + surface->FillRectangle(rcSegment, vsDraw.styles[STYLE_DEFAULT].back.allocated); + } + if (vsDraw.selEOLFilled && eolInSelection && vsDraw.selbackset && (line < pdoc->LinesTotal() - 1) && (vsDraw.selAlpha != SC_ALPHA_NOALPHA)) { + SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw), vsDraw.selAlpha); + } + } + if (drawWrapMarkEnd) { PRectangle rcPlace = rcSegment; @@ -6898,6 +6913,14 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_GETSELALPHA: return vs.selAlpha; + case SCI_GETSELEOLFILLED: + return vs.selEOLFilled; + + case SCI_SETSELEOLFILLED: + vs.selEOLFilled = wParam != 0; + InvalidateStyleRedraw(); + break; + case SCI_SETWHITESPACEFORE: vs.whitespaceForegroundSet = wParam != 0; vs.whitespaceForeground.desired = ColourDesired(lParam); diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx index b4da30ace..b6b14da9b 100644 --- a/src/ViewStyle.cxx +++ b/src/ViewStyle.cxx @@ -74,6 +74,7 @@ ViewStyle::ViewStyle(const ViewStyle &source) { selbackground.desired = source.selbackground.desired; selbackground2.desired = source.selbackground2.desired; selAlpha = source.selAlpha; + selEOLFilled = source.selEOLFilled; foldmarginColourSet = source.foldmarginColourSet; foldmarginColour.desired = source.foldmarginColour.desired; @@ -143,6 +144,7 @@ void ViewStyle::Init() { selbackground.desired = ColourDesired(0xc0, 0xc0, 0xc0); selbackground2.desired = ColourDesired(0xb0, 0xb0, 0xb0); selAlpha = SC_ALPHA_NOALPHA; + selEOLFilled = false; foldmarginColourSet = false; foldmarginColour.desired = ColourDesired(0xff, 0, 0); diff --git a/src/ViewStyle.h b/src/ViewStyle.h index 75f899d97..86eae63c0 100644 --- a/src/ViewStyle.h +++ b/src/ViewStyle.h @@ -54,6 +54,7 @@ public: ColourPair selbackground; ColourPair selbackground2; int selAlpha; + bool selEOLFilled; bool whitespaceForegroundSet; ColourPair whitespaceForeground; bool whitespaceBackgroundSet; |