Skip to content
This repository was archived by the owner on Dec 22, 2023. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/ScintillaNET/Line.cs
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,11 @@ public unsafe string AnnotationText
}
set
{
if (string.IsNullOrEmpty(value))
// allow empty annotation, set to null to remove
if (value == null)
{
// Scintilla docs suggest that setting to NULL rather than an empty string will free memory
scintilla.DirectMessage(NativeMethods.SCI_ANNOTATIONGETTEXT, new IntPtr(Index), IntPtr.Zero);
scintilla.DirectMessage(NativeMethods.SCI_ANNOTATIONSETTEXT, new IntPtr(Index), IntPtr.Zero);
}
else
{
Expand Down