This patch will add a get-selection function that returns the currently selected text.
0001-Add-a-Get-Selection-function.patch