Select the correct function when at the end of the function.

There was a small typo that was causing the next function to be selected
when the cursor was placed at the end of the function.  line() returns
the line number, not the contents.  Use getline() instead.