aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx50
1 files changed, 50 insertions, 0 deletions
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<Sci::Line>(wParam), CharPtrFromSPtr(lParam));
+ break;
+
+ case SCI_EOLANNOTATIONGETTEXT: {
+ const StyledText st = pdoc->EOLAnnotationStyledText(static_cast<Sci::Line>(wParam));
+ return BytesResult(lParam, reinterpret_cast<const unsigned char *>(st.text), st.length);
+ }
+
+ case SCI_EOLANNOTATIONGETSTYLE: {
+ const StyledText st = pdoc->EOLAnnotationStyledText(static_cast<Sci::Line>(wParam));
+ return st.style;
+ }
+
+ case SCI_EOLANNOTATIONSETSTYLE:
+ pdoc->EOLAnnotationSetStyle(static_cast<Sci::Line>(wParam), static_cast<int>(lParam));
+ break;
+
+ case SCI_EOLANNOTATIONCLEARALL:
+ pdoc->EOLAnnotationClearAll();
+ break;
+
+ case SCI_EOLANNOTATIONSETVISIBLE:
+ SetEOLAnnotationVisible(static_cast<int>(wParam));
+ break;
+
+ case SCI_EOLANNOTATIONGETVISIBLE:
+ return vs.eolAnnotationVisible;
+
+ case SCI_EOLANNOTATIONSETSTYLEOFFSET:
+ vs.eolAnnotationStyleOffset = static_cast<int>(wParam);
+ InvalidateStyleRedraw();
+ break;
+
+ case SCI_EOLANNOTATIONGETSTYLEOFFSET:
+ return vs.eolAnnotationStyleOffset;
+
case SCI_RELEASEALLEXTENDEDSTYLES:
vs.ReleaseAllExtendedStyles();
break;