Fix Edit.makeTextInfo(caret) when selection is present (#16455)
Summary of the issue:
Suppose some text is selected in NVDA log viewer. Caret can be either at the beginning or at the end of selection, depending on whether we selected text back or forward. Now when calling
focus.makeTextInfo('caret')
I observed that instead of actual caret position, it always returns the beginning of the selection, which is wrong.
Description of user facing changes
N/A as far as I can tell.
Description of development approach
This PR fixes bug in NVDAObjects.window.edit.ITextDocumentTextInfo class.
I query ITextSelection.Flags and check whetehr tomSelStartActive flag is set, and depending on that I collapse either to beginning or to the end depending where the curosr actually is located at the moment.