diff --git a/src/RadLine/ILineDecorationRenderer.cs b/src/RadLine/ILineDecorationRenderer.cs new file mode 100644 index 0000000..bc64216 --- /dev/null +++ b/src/RadLine/ILineDecorationRenderer.cs @@ -0,0 +1,7 @@ +namespace RadLine +{ + public interface ILineDecorationRenderer + { + void RenderLineDecoration(LineBuffer buffer); + } +} diff --git a/src/RadLine/LineEditor.cs b/src/RadLine/LineEditor.cs index 440688a..765abdd 100644 --- a/src/RadLine/LineEditor.cs +++ b/src/RadLine/LineEditor.cs @@ -26,6 +26,8 @@ public sealed class LineEditor : IHighlighterAccessor public IHighlighter? Highlighter { get; init; } public ILineEditorHistory History => _history; + public ILineDecorationRenderer? LineDecorationRenderer { get; init; } + public LineEditor(IAnsiConsole? terminal = null, IInputSource? source = null, IServiceProvider? provider = null) { _console = terminal ?? AnsiConsole.Console; @@ -185,6 +187,7 @@ public static bool IsSupported(IAnsiConsole console) // Render the line _renderer.RenderLine(state); + LineDecorationRenderer?.RenderLineDecoration(state.Buffer); } }