Terminal emulation select all

0 votes
asked Sep 12, 2016 by carnch (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
answered Sep 13, 2016 by Pavel Matyska (13,940 points)


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: