Skip to content

Commit e5e3532

Browse files
committed
Added line decoration renderer.
1 parent 51ff1df commit e5e3532

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace RadLine
2+
{
3+
public interface ILineDecorationRenderer
4+
{
5+
void RenderLineDecoration(LineBuffer buffer);
6+
}
7+
}

src/RadLine/LineEditor.cs

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ public sealed class LineEditor : IHighlighterAccessor
2626
public IHighlighter? Highlighter { get; init; }
2727
public ILineEditorHistory History => _history;
2828

29+
public ILineDecorationRenderer? LineDecorationRenderer { get; init; }
30+
2931
public LineEditor(IAnsiConsole? terminal = null, IInputSource? source = null, IServiceProvider? provider = null)
3032
{
3133
_console = terminal ?? AnsiConsole.Console;
@@ -185,6 +187,7 @@ public static bool IsSupported(IAnsiConsole console)
185187

186188
// Render the line
187189
_renderer.RenderLine(state);
190+
LineDecorationRenderer?.RenderLineDecoration(state.Buffer);
188191
}
189192
}
190193

0 commit comments

Comments
 (0)