kana / vim-textobj-function

Vim plugin: Text objects for functions
http://www.vim.org/scripts/script.php?script_id=2619
141 stars 34 forks source link

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

Closed jszakmeister closed 11 years ago

jszakmeister commented 11 years ago

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.

jszakmeister commented 11 years ago

Fixed the commit message... the first line wasn't clear about what was being fixed.

kana commented 11 years ago

Thank you for the patch. I've merged it. I also wrote tests.

jszakmeister commented 11 years ago

Thanks! And thanks for the pointer to the tests.