Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

textobj: include function variable for anonymous functions #1345

Merged
merged 1 commit into from
Jul 12, 2017

Conversation

fatih
Copy link
Owner

@fatih fatih commented Jul 6, 2017

fixes #1181

@@ -60,6 +64,16 @@ function! go#textobj#Function(mode) abort
" want's to include doc comments for function declarations
if has_key(info, 'doc') && g:go_textobj_include_function_doc
call cursor(info.doc.line, info.doc.col)
elseif info['sig']['name'] == '' && g:go_textobj_include_variable
Copy link
Contributor

@arp242 arp242 Jul 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you meant g:go_textobj_include_function_assignment here, and not g:go_textobj_include_variable?

Or change the default above:

if !exists("g:go_textobj_include_function_assignment")
  let g:go_textobj_include_function_assignment = 1
endif

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made the changes but seems like I've forgot to push. Thanks for the reminder!

@fatih fatih merged commit 8b02779 into master Jul 12, 2017
@fatih fatih deleted the include-func-variable branch July 12, 2017 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

af text object for a literal function should also include the assignment
2 participants