Gather information about a line based on content and cursor position.