kana/vim-textobj-function — pull request #5 by jszakmeister (2013-01-27 18:44:31+00:00)
Title: Stop selecting the text 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.