0 votes
by (250 points)

I'm trying to find a way to programmatically select (highlight) the entire screen including the buffer. Is this possible? If not, how do I programmatically select the visible screen, for example, from 0,0 to 80,25

1 Answer

+1 vote
by (15.2k points)

Hi,

you can select entire screen including the history buffer with this line (where terminal is TerminalControl instance):

terminal.SetSelection(0, -terminal.HistoryLength, terminal.Screen.Columns, terminal.Screen.Rows);

Then, you can read all selected text with this line:

terminal.GetSelectedText()
...