From 1da92e82c03b517c9c814fce343d86d382a90a0a Mon Sep 17 00:00:00 2001
From: Prakash Sahni
@@ -3725,6 +3727,99 @@ struct Sci_TextToFind {
before ○ Building Scintilla
+ ○ End of Line Annotations
+
SCI_ANNOTATIONSETSTYLEOFFSET and use the result as the argument to SCI_ANNOTATIONSETSTYLEOFFSET.
End of Line Annotations are read-only lines of text at the end of each line of editable text. + End of Line Annotations can be used to display an assembler version of code for debugging or to show diagnostic messages inline or to + line up different versions of text in a merge tool.
+ +End of Line Annotations used to display an assembler version of code for debugging
+
+ SCI_EOLANNOTATIONSETTEXT(line line, const char *text)
+ SCI_EOLANNOTATIONGETTEXT(line line, char *text) → int
+ SCI_EOLANNOTATIONSETSTYLE(line line, int style)
+ SCI_EOLANNOTATIONGETSTYLE(line line) → int
+ SCI_EOLANNOTATIONCLEARALL
+ SCI_EOLANNOTATIONSETVISIBLE(int visible)
+ SCI_EOLANNOTATIONGETVISIBLE → int
+ SCI_EOLANNOTATIONSETSTYLEOFFSET(int style)
+ SCI_EOLANNOTATIONGETSTYLEOFFSET → int
+
+
+
+ SCI_EOLANNOTATIONSETTEXT(line line, const char *text)
+ SCI_EOLANNOTATIONGETTEXT(line line, char *text) → int
+ SCI_EOLANNOTATIONSETSTYLE(line line, int style)
+ SCI_EOLANNOTATIONGETSTYLE(line line) → int
+ SCI_EOLANNOTATIONCLEARALL
+ A different string may be set for each line with SCI_EOLANNOTATIONSETTEXT.
+ To clear end of line annotations call SCI_EOLANNOTATIONSETTEXT with a NULL pointer.
+ The whole of the text EOLANNOTATION on a line may be displayed in a particular style with
+ SCI_EOLANNOTATIONSETSTYLE or each character may be individually styled with
+ of the corresponding text byte similar to SCI_SETSTYLINGEX. The text must be set first as it
+ specifies how long the end of line annotation is so how many bytes of styling to read.
+ Setting an end of line annotation will cause a
+
+ notification to be sent.
+
+ All the lines can be cleared of end of line annotations with SCI_EOLANNOTATIONCLEARALL
+ which is equivalent to clearing each line (setting to 0) and then deleting other memory used for this feature.
+
+ Only some style attributes are active in end of line annotations: font, size/sizeFractional, bold/weight, italics, fore, back, and characterSet. +
+
+ SCI_EOLANNOTATIONSETVISIBLE(int visible)
+ SCI_EOLANNOTATIONGETVISIBLE → int
+ End of Line Annotations can be made visible in a view and there is a choice of display style when visible.
+ The two messages set and get the annotation display mode. The visible
+ argument can be one of:
EOLANNOTATION_HIDDEN |
+
+ 0 | + +End of Line Annotations are not displayed. | +
|---|---|---|
EOLANNOTATION_STANDARD |
+
+ 1 | + +End of Line Annotations are drawn left justified with no adornment. | +
EOLANNOTATION_BOXED |
+
+ 2 | + +End of Line Annotations are indented to match the text and are surrounded by a box. | +
+ SCI_EOLANNOTATIONSETSTYLEOFFSET(int style)
+ SCI_EOLANNOTATIONGETSTYLEOFFSET → int
+ End of Line Annotation styles may be completely separated from standard text styles by setting a style offset. For example,
+ SCI_EOLANNOTATIONSETSTYLEOFFSET(512) would allow the end of line annotation styles to be numbered from
+ 512 up to 767 so they do not overlap styles set by lexers (or margins if margins offset is 256).
+ Each style number set with SCI_EOLANNOTATIONSETSTYLE
+ or SCI_EOLANNOTATIONSETSTYLES has the offset added before looking up the style.
+
+ Always call SCI_ALLOCATEEXTENDEDSTYLES
+ before SCI_EOLANNOTATIONSETSTYLEOFFSET and use the result as the argument to SCI_EOLANNOTATIONSETSTYLEOFFSET.
+
SCI_SETBUFFEREDDRAW(bool buffered)
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index c6d5b0539..10e88fd2a 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -555,6 +555,7 @@
Shmuel Zeigerman
Chris Graham
Hugues Larrive
+ Prakash Sahni
@@ -574,6 +575,10 @@
Released 3 June 2020.
+ End of line annotations implemented.
+ Bug #2141.
+
+
The latex lexer supports lstlisting environment that is similar to verbatim.
Feature #1358.
diff --git a/doc/eolannotation.png b/doc/eolannotation.png
new file mode 100644
index 000000000..5dacbf569
Binary files /dev/null and b/doc/eolannotation.png differ
diff --git a/include/Scintilla.h b/include/Scintilla.h
index ad36c19b2..d3b6ac237 100644
--- a/include/Scintilla.h
+++ b/include/Scintilla.h
@@ -1005,6 +1005,18 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SCI_SETREPRESENTATION 2665
#define SCI_GETREPRESENTATION 2666
#define SCI_CLEARREPRESENTATION 2667
+#define SCI_EOLANNOTATIONSETTEXT 2740
+#define SCI_EOLANNOTATIONGETTEXT 2741
+#define SCI_EOLANNOTATIONSETSTYLE 2742
+#define SCI_EOLANNOTATIONGETSTYLE 2743
+#define SCI_EOLANNOTATIONCLEARALL 2744
+#define EOLANNOTATION_HIDDEN 0
+#define EOLANNOTATION_STANDARD 1
+#define EOLANNOTATION_BOXED 2
+#define SCI_EOLANNOTATIONSETVISIBLE 2745
+#define SCI_EOLANNOTATIONGETVISIBLE 2746
+#define SCI_EOLANNOTATIONSETSTYLEOFFSET 2747
+#define SCI_EOLANNOTATIONGETSTYLEOFFSET 2748
#define SCI_STARTRECORD 3001
#define SCI_STOPRECORD 3002
#define SCI_SETLEXER 4001
@@ -1065,7 +1077,8 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SC_MOD_LEXERSTATE 0x80000
#define SC_MOD_INSERTCHECK 0x100000
#define SC_MOD_CHANGETABSTOPS 0x200000
-#define SC_MODEVENTMASKALL 0x3FFFFF
+#define SC_MOD_CHANGEEOLANNOTATION 0x400000
+#define SC_MODEVENTMASKALL 0x7FFFFF
#define SC_UPDATE_CONTENT 0x1
#define SC_UPDATE_SELECTION 0x2
#define SC_UPDATE_V_SCROLL 0x4
diff --git a/include/Scintilla.iface b/include/Scintilla.iface
index 2d53ba391..b8d92da19 100644
--- a/include/Scintilla.iface
+++ b/include/Scintilla.iface
@@ -2837,6 +2837,38 @@ get int GetRepresentation=2666(string encodedCharacter, stringresult representat
# Remove a character representation.
fun void ClearRepresentation=2667(string encodedCharacter,)
+# Set the end of line annotation text for a line
+set void EOLAnnotationSetText=2740(line line, string text)
+
+# Get the end of line annotation text for a line
+get int EOLAnnotationGetText=2741(line line, stringresult text)
+
+# Set the style number for the end of line annotations for a line
+set void EOLAnnotationSetStyle=2742(line line, int style)
+
+# Get the style number for the end of line annotations for a line
+get int EOLAnnotationGetStyle=2743(line line,)
+
+# Clear the end of annotations from all lines
+fun void EOLAnnotationClearAll=2744(,)
+
+enu EOLAnnotationVisible=EOLANNOTATION_
+val EOLANNOTATION_HIDDEN=0
+val EOLANNOTATION_STANDARD=1
+val EOLANNOTATION_BOXED=2
+
+# Set the visibility for the end of line annotations for a view
+set void EOLAnnotationSetVisible=2745(EOLAnnotationVisible visible,)
+
+# Get the visibility for the end of line annotations for a view
+get EOLAnnotationVisible EOLAnnotationGetVisible=2746(,)
+
+# Get the start of the range of style numbers used for end of line annotations
+set void EOLAnnotationSetStyleOffset=2747(int style,)
+
+# Get the start of the range of style numbers used for end of line annotations
+get int EOLAnnotationGetStyleOffset=2748(,)
+
# Start notifying the container of all key presses and commands.
fun void StartRecord=3001(,)
@@ -2987,7 +3019,8 @@ val SC_MOD_CONTAINER=0x40000
val SC_MOD_LEXERSTATE=0x80000
val SC_MOD_INSERTCHECK=0x100000
val SC_MOD_CHANGETABSTOPS=0x200000
-val SC_MODEVENTMASKALL=0x3FFFFF
+val SC_MOD_CHANGEEOLANNOTATION=0x400000
+val SC_MODEVENTMASKALL=0x7FFFFF
ali SC_MOD_INSERTTEXT=INSERT_TEXT
ali SC_MOD_DELETETEXT=DELETE_TEXT
@@ -3007,6 +3040,7 @@ ali SC_MOD_CHANGEANNOTATION=CHANGE_ANNOTATION
ali SC_MOD_LEXERSTATE=LEXER_STATE
ali SC_MOD_INSERTCHECK=INSERT_CHECK
ali SC_MOD_CHANGETABSTOPS=CHANGE_TAB_STOPS
+ali SC_MOD_CHANGEEOLANNOTATION=CHANGE_E_O_L_ANNOTATION
ali SC_MODEVENTMASKALL=EVENT_MASK_ALL
enu Update=SC_UPDATE_
diff --git a/src/Document.cxx b/src/Document.cxx
index ff009ee3e..f17e4f837 100644
--- a/src/Document.cxx
+++ b/src/Document.cxx
@@ -137,6 +137,7 @@ Document::Document(int options) :
perLineData[ldState] = std::make_unique();
perLineData[ldMargin] = std::make_unique();
perLineData[ldAnnotation] = std::make_unique();
+ perLineData[ldEOLAnnotation] = std::make_unique();
decorations = DecorationListCreate(IsLarge());
@@ -212,6 +213,10 @@ LineAnnotation *Document::Annotations() const noexcept {
return dynamic_cast(perLineData[ldAnnotation].get());
}
+LineAnnotation *Document::EOLAnnotations() const noexcept {
+ return dynamic_cast(perLineData[ldEOLAnnotation].get());
+}
+
int Document::LineEndTypesSupported() const {
if ((SC_CP_UTF8 == dbcsCodePage) && pli)
return pli->LineEndTypesSupported();
@@ -2385,6 +2390,36 @@ void Document::AnnotationClearAll() {
Annotations()->ClearAll();
}
+StyledText Document::EOLAnnotationStyledText(Sci::Line line) const noexcept {
+ const LineAnnotation *pla = EOLAnnotations();
+ return StyledText(pla->Length(line), pla->Text(line),
+ pla->MultipleStyles(line), pla->Style(line), pla->Styles(line));
+}
+
+void Document::EOLAnnotationSetText(Sci::Line line, const char *text) {
+ if (line >= 0 && line < LinesTotal()) {
+ EOLAnnotations()->SetText(line, text);
+ DocModification mh(SC_MOD_CHANGEEOLANNOTATION, LineStart(line),
+ 0, 0, 0, line);
+ NotifyModified(mh);
+ }
+}
+
+void Document::EOLAnnotationSetStyle(Sci::Line line, int style) {
+ EOLAnnotations()->SetStyle(line, style);
+ const DocModification mh(SC_MOD_CHANGEEOLANNOTATION, LineStart(line),
+ 0, 0, 0, line);
+ NotifyModified(mh);
+}
+
+void Document::EOLAnnotationClearAll() {
+ const Sci::Line maxEditorLine = LinesTotal();
+ for (Sci::Line l=0; lClearAll();
+}
+
void Document::IncrementStyleClock() noexcept {
styleClock = (styleClock + 1) % 0x100000;
}
diff --git a/src/Document.h b/src/Document.h
index a1017810e..6e8507f04 100644
--- a/src/Document.h
+++ b/src/Document.h
@@ -244,13 +244,14 @@ private:
std::vector watchers;
// ldSize is not real data - it is for dimensions and loops
- enum lineData { ldMarkers, ldLevels, ldState, ldMargin, ldAnnotation, ldSize };
+ enum lineData { ldMarkers, ldLevels, ldState, ldMargin, ldAnnotation, ldEOLAnnotation, ldSize };
std::unique_ptr perLineData[ldSize];
LineMarkers *Markers() const noexcept;
LineLevels *Levels() const noexcept;
LineState *States() const noexcept;
LineAnnotation *Margins() const noexcept;
LineAnnotation *Annotations() const noexcept;
+ LineAnnotation *EOLAnnotations() const noexcept;
bool matchesValid;
std::unique_ptr regex;
@@ -483,6 +484,11 @@ public:
int AnnotationLines(Sci::Line line) const noexcept;
void AnnotationClearAll();
+ StyledText EOLAnnotationStyledText(Sci::Line line) const noexcept;
+ void EOLAnnotationSetStyle(Sci::Line line, int style);
+ void EOLAnnotationSetText(Sci::Line line, const char *text);
+ void EOLAnnotationClearAll();
+
bool AddWatcher(DocWatcher *watcher, void *userData);
bool RemoveWatcher(DocWatcher *watcher, void *userData);
diff --git a/src/EditView.cxx b/src/EditView.cxx
index 9599e293f..290106a49 100644
--- a/src/EditView.cxx
+++ b/src/EditView.cxx
@@ -1050,7 +1050,8 @@ void EditView::DrawEOL(Surface *surface, const EditModel &model, const ViewStyle
rcSegment.left = rcLine.left;
rcSegment.right = rcLine.right;
- const bool fillRemainder = !lastSubLine || !model.GetFoldDisplayText(line);
+ bool drawEOLAnnotationStyledText = (vsDraw.eolAnnotationVisible != EOLANNOTATION_HIDDEN) && model.pdoc->EOLAnnotationStyledText(line).text;
+ const bool fillRemainder = (!lastSubLine || (!model.GetFoldDisplayText(line) && !drawEOLAnnotationStyledText));
if (fillRemainder) {
// Fill the remainder of the line
FillLineRemainder(surface, model, vsDraw, ll, line, rcSegment, subLine);
@@ -1285,6 +1286,95 @@ void EditView::DrawFoldDisplayText(Surface *surface, const EditModel &model, con
}
}
+void EditView::DrawEOLAnnotationText(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, Sci::Line line, int xStart, PRectangle rcLine, int subLine, XYACCUMULATOR subLineStart, DrawPhase phase) {
+
+ const bool lastSubLine = subLine == (ll->lines - 1);
+ if (!lastSubLine)
+ return;
+
+ if (vsDraw.eolAnnotationVisible == EOLANNOTATION_HIDDEN) {
+ return;
+ }
+ const StyledText stEOLAnnotation = model.pdoc->EOLAnnotationStyledText(line);
+ if (!stEOLAnnotation.text || !ValidStyledText(vsDraw, vsDraw.eolAnnotationStyleOffset, stEOLAnnotation)) {
+ return;
+ }
+ const std::string_view eolAnnotationText(stEOLAnnotation.text, stEOLAnnotation.length);
+ const size_t style = stEOLAnnotation.style + vsDraw.eolAnnotationStyleOffset;
+
+ PRectangle rcSegment = rcLine;
+ FontAlias fontText = vsDraw.styles[style].font;
+ const int widthEOLAnnotationText = static_cast(surface->WidthText(fontText, eolAnnotationText));
+
+ const XYPOSITION spaceWidth = vsDraw.styles[ll->EndLineStyle()].spaceWidth;
+ const XYPOSITION virtualSpace = model.sel.VirtualSpaceFor(
+ model.pdoc->LineEnd(line)) * spaceWidth;
+ rcSegment.left = xStart +
+ static_cast(ll->positions[ll->numCharsInLine] - subLineStart)
+ + virtualSpace + vsDraw.aveCharWidth;
+
+ const char *textFoldDisplay = model.GetFoldDisplayText(line);
+ if (textFoldDisplay) {
+ const std::string_view foldDisplayText(textFoldDisplay);
+ rcSegment.left += (static_cast(surface->WidthText(fontText, foldDisplayText)) + vsDraw.aveCharWidth);
+ }
+ rcSegment.right = rcSegment.left + static_cast(widthEOLAnnotationText);
+
+ const ColourOptional background = vsDraw.Background(model.pdoc->GetMark(line), model.caret.active, ll->containsCaret);
+ ColourDesired textFore = vsDraw.styles[style].fore;
+ const ColourDesired textBack = TextBackground(model, vsDraw, ll, background, false,
+ false, static_cast(style), -1);
+
+ if (model.trackLineWidth) {
+ if (rcSegment.right + 1> lineWidthMaxSeen) {
+ // EOL Annotation text border drawn on rcSegment.right with width 1 is the last visible object of the line
+ lineWidthMaxSeen = static_cast(rcSegment.right + 1);
+ }
+ }
+
+ if (phase & drawBack) {
+ surface->FillRectangle(rcSegment, textBack);
+
+ // Fill Remainder of the line
+ PRectangle rcRemainder = rcSegment;
+ rcRemainder.left = rcRemainder.right;
+ if (rcRemainder.left < rcLine.left)
+ rcRemainder.left = rcLine.left;
+ rcRemainder.right = rcLine.right;
+ FillLineRemainder(surface, model, vsDraw, ll, line, rcRemainder, subLine);
+ }
+
+ if (phase & drawText) {
+ if (phasesDraw != phasesOne) {
+ surface->DrawTextTransparent(rcSegment, fontText,
+ rcSegment.top + vsDraw.maxAscent, eolAnnotationText,
+ textFore);
+ } else {
+ surface->DrawTextNoClip(rcSegment, fontText,
+ rcSegment.top + vsDraw.maxAscent, eolAnnotationText,
+ textFore, textBack);
+ }
+ }
+
+ if (phase & drawIndicatorsFore) {
+ if (vsDraw.eolAnnotationVisible == EOLANNOTATION_BOXED ) {
+ surface->PenColour(textFore);
+ PRectangle rcBox = rcSegment;
+ rcBox.left = std::round(rcSegment.left);
+ rcBox.right = std::round(rcSegment.right);
+ const IntegerRectangle ircBox(rcBox);
+ surface->MoveTo(ircBox.left, ircBox.top);
+ surface->LineTo(ircBox.left, ircBox.bottom);
+ surface->MoveTo(ircBox.right, ircBox.top);
+ surface->LineTo(ircBox.right, ircBox.bottom);
+ surface->MoveTo(ircBox.left, ircBox.top);
+ surface->LineTo(ircBox.right, ircBox.top);
+ surface->MoveTo(ircBox.left, ircBox.bottom - 1);
+ surface->LineTo(ircBox.right, ircBox.bottom - 1);
+ }
+ }
+}
+
static constexpr bool AnnotationBoxedOrIndented(int annotationVisible) noexcept {
return annotationVisible == ANNOTATION_BOXED || annotationVisible == ANNOTATION_INDENTED;
}
@@ -2039,6 +2129,7 @@ void EditView::DrawLine(Surface *surface, const EditModel &model, const ViewStyl
DrawBackground(surface, model, vsDraw, ll, rcLine, lineRange, posLineStart, xStart,
subLine, background);
DrawFoldDisplayText(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, subLineStart, drawBack);
+ DrawEOLAnnotationText(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, subLineStart, drawBack);
phase = static_cast(phase & ~drawBack); // Remove drawBack to not draw again in DrawFoldDisplayText
DrawEOL(surface, model, vsDraw, ll, rcLine, line, lineRange.end,
xStart, subLine, subLineStart, background);
@@ -2069,6 +2160,7 @@ void EditView::DrawLine(Surface *surface, const EditModel &model, const ViewStyl
}
DrawFoldDisplayText(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, subLineStart, phase);
+ DrawEOLAnnotationText(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, subLineStart, phase);
if (phasesDraw == phasesOne) {
DrawEOL(surface, model, vsDraw, ll, rcLine, line, lineRange.end,
diff --git a/src/EditView.h b/src/EditView.h
index 6eb63a686..8f544f280 100644
--- a/src/EditView.h
+++ b/src/EditView.h
@@ -133,6 +133,8 @@ public:
ColourOptional background);
void DrawFoldDisplayText(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll,
Sci::Line line, int xStart, PRectangle rcLine, int subLine, XYACCUMULATOR subLineStart, DrawPhase phase);
+ void DrawEOLAnnotationText(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll,
+ Sci::Line line, int xStart, PRectangle rcLine, int subLine, XYACCUMULATOR subLineStart, DrawPhase phase);
void DrawAnnotation(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll,
Sci::Line line, int xStart, PRectangle rcLine, int subLine, DrawPhase phase);
void DrawCarets(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, Sci::Line lineDoc,
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 234a2aaa6..12688da66 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -2126,6 +2126,7 @@ void Editor::ClearAll() {
if (!pdoc->IsReadOnly()) {
pcs->Clear();
pdoc->AnnotationClearAll();
+ pdoc->EOLAnnotationClearAll();
pdoc->MarginClearAll();
}
}
@@ -2661,6 +2662,11 @@ void Editor::NotifyModified(Document *, DocModification mh, void *) {
Redraw();
}
}
+ if (mh.modificationType & SC_MOD_CHANGEEOLANNOTATION) {
+ if (vs.eolAnnotationVisible) {
+ Redraw();
+ }
+ }
CheckModificationForWrap(mh);
if (mh.linesAdded != 0) {
// Avoid scrolling of display if change before current display
@@ -5303,6 +5309,13 @@ void Editor::SetAnnotationVisible(int visible) {
}
}
+void Editor::SetEOLAnnotationVisible(int visible) {
+ if (vs.eolAnnotationVisible != visible) {
+ vs.eolAnnotationVisible = visible;
+ Redraw();
+ }
+}
+
/**
* Recursively expand a fold, making lines visible except where they have an unexpanded parent.
*/
@@ -8069,6 +8082,43 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
case SCI_ANNOTATIONGETSTYLEOFFSET:
return vs.annotationStyleOffset;
+ case SCI_EOLANNOTATIONSETTEXT:
+ pdoc->EOLAnnotationSetText(static_cast(wParam), CharPtrFromSPtr(lParam));
+ break;
+
+ case SCI_EOLANNOTATIONGETTEXT: {
+ const StyledText st = pdoc->EOLAnnotationStyledText(static_cast(wParam));
+ return BytesResult(lParam, reinterpret_cast(st.text), st.length);
+ }
+
+ case SCI_EOLANNOTATIONGETSTYLE: {
+ const StyledText st = pdoc->EOLAnnotationStyledText(static_cast(wParam));
+ return st.style;
+ }
+
+ case SCI_EOLANNOTATIONSETSTYLE:
+ pdoc->EOLAnnotationSetStyle(static_cast(wParam), static_cast(lParam));
+ break;
+
+ case SCI_EOLANNOTATIONCLEARALL:
+ pdoc->EOLAnnotationClearAll();
+ break;
+
+ case SCI_EOLANNOTATIONSETVISIBLE:
+ SetEOLAnnotationVisible(static_cast(wParam));
+ break;
+
+ case SCI_EOLANNOTATIONGETVISIBLE:
+ return vs.eolAnnotationVisible;
+
+ case SCI_EOLANNOTATIONSETSTYLEOFFSET:
+ vs.eolAnnotationStyleOffset = static_cast(wParam);
+ InvalidateStyleRedraw();
+ break;
+
+ case SCI_EOLANNOTATIONGETSTYLEOFFSET:
+ return vs.eolAnnotationStyleOffset;
+
case SCI_RELEASEALLEXTENDEDSTYLES:
vs.ReleaseAllExtendedStyles();
break;
diff --git a/src/Editor.h b/src/Editor.h
index dda14c311..74137cd48 100644
--- a/src/Editor.h
+++ b/src/Editor.h
@@ -546,6 +546,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
virtual void SetDocPointer(Document *document);
void SetAnnotationVisible(int visible);
+ void SetEOLAnnotationVisible(int visible);
Sci::Line ExpandLine(Sci::Line line);
void SetFoldExpanded(Sci::Line lineDoc, bool expanded);
diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx
index b23d7d695..fab1a2406 100644
--- a/src/ViewStyle.cxx
+++ b/src/ViewStyle.cxx
@@ -129,6 +129,8 @@ ViewStyle::ViewStyle(const ViewStyle &source) : markers(MARKER_MAX + 1), indicat
marginStyleOffset = source.marginStyleOffset;
annotationVisible = source.annotationVisible;
annotationStyleOffset = source.annotationStyleOffset;
+ eolAnnotationVisible = source.eolAnnotationVisible;
+ eolAnnotationStyleOffset = source.eolAnnotationStyleOffset;
braceHighlightIndicatorSet = source.braceHighlightIndicatorSet;
braceHighlightIndicator = source.braceHighlightIndicator;
braceBadLightIndicatorSet = source.braceBadLightIndicatorSet;
@@ -262,6 +264,8 @@ void ViewStyle::Init(size_t stylesSize_) {
marginStyleOffset = 0;
annotationVisible = ANNOTATION_HIDDEN;
annotationStyleOffset = 0;
+ eolAnnotationVisible = EOLANNOTATION_HIDDEN;
+ eolAnnotationStyleOffset = 0;
braceHighlightIndicatorSet = false;
braceHighlightIndicator = 0;
braceBadLightIndicatorSet = false;
diff --git a/src/ViewStyle.h b/src/ViewStyle.h
index 33ea1d6c2..e5bf375f4 100644
--- a/src/ViewStyle.h
+++ b/src/ViewStyle.h
@@ -145,6 +145,8 @@ public:
int marginStyleOffset;
int annotationVisible;
int annotationStyleOffset;
+ int eolAnnotationVisible;
+ int eolAnnotationStyleOffset;
bool braceHighlightIndicatorSet;
int braceHighlightIndicator;
bool braceBadLightIndicatorSet;
--
cgit v1.2.3