55using XTerm . Input ;
66using XTerm . Events . Parser ;
77using XTerm . Events ;
8+ using XTerm . Selection ;
89
910namespace XTerm ;
1011
@@ -18,6 +19,7 @@ public class Terminal
1819 private readonly InputHandler _inputHandler ;
1920 private readonly KeyboardInputGenerator _keyboardInput ;
2021 private readonly MouseTracker _mouseTracker ;
22+ private readonly SelectionManager _selectionManager ;
2123 private Buffer . TerminalBuffer _buffer ;
2224 private Buffer . TerminalBuffer ? _normalBuffer ;
2325 private Buffer . TerminalBuffer ? _altBuffer ;
@@ -184,7 +186,8 @@ public Terminal(TerminalOptions? options = null)
184186 _parser = new EscapeSequenceParser ( ) ;
185187 _inputHandler = new InputHandler ( this ) ;
186188 _keyboardInput = new KeyboardInputGenerator ( this ) ;
187- _mouseTracker = new MouseTracker ( this ) ; // Initialize mouse tracker
189+ _mouseTracker = new MouseTracker ( this ) ;
190+ _selectionManager = new SelectionManager ( this ) ;
188191
189192 // Subscribe to parser events using C# event pattern
190193 _parser . Print += OnParserPrint ;
@@ -447,6 +450,11 @@ public string GenerateFocusEvent(bool focused)
447450 /// </summary>
448451 public MouseEncoding MouseEncoding => _mouseTracker . Encoding ;
449452
453+ /// <summary>
454+ /// Gets the selection manager for text selection.
455+ /// </summary>
456+ public SelectionManager Selection => _selectionManager ;
457+
450458 /// <summary>
451459 /// Gets the mouse tracker (internal use for mode setting).
452460 /// </summary>
0 commit comments