MozillaCompoundTextInfo: Don't adjust for the end of a line if the previous character is a line feed. (#16763)
Fixup of #16745.
Summary of the issue:
In my work on #16745, I neglected to consider an empty line after a line feed. In that case, adjusting for the line end caused NVDA to read from the previous line instead of the empty one.
Description of user facing changes
In Firefox, NVDA no longer speaks the previous line when the caret is on the last line and the last line is empty. However, this does not need a change log entry because this bug never shipped in release.
Description of development approach
Don't set the _isInsertionPointAtEndOfLine flag to True if the previous character is a line feed. This prevents the line end adjustment.
Because this additional check makes the code a little more complex, I refactored this code into a helper method.