-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
refactored duplicate offset functions #762
Conversation
function! go#complete#GetInfo() | ||
let offset = go#complete#gocodeCursor()+1 | ||
return go#complete#GetInfoFromOffset(offset) | ||
endfunction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a public function that people use, for example to plugin into statusline or use for their own functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function is still there, I renamed the top one.
Hi @nhooyr, did you also checked out which implementation is the correct one? Or are they really all the same? |
|
||
let argOff = "-o=" . offs | ||
return argOff | ||
return "-o=" . go#util#OffsetCursor() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should remove s:getOffset()
and change def.vim
to make it that it uses this directly if possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do.
@fatih all are the basically the exact same as far as I can tell. |
updated based on feedback. |
Thanks @nhooyr I need to test this myself, If everything works as intended, I'll merge it. |
@fatih ok. here are the differences, the ones in rename.vim and oracle.vim were the exact same. They were copies of the |
refactored duplicate offset functions
Thanks @nhooyr , great refactor, much appreciated 👍 |
Closes #719