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

Call trim() only if the function exists #8

Merged
merged 1 commit into from Jul 14, 2019

Conversation

@icyflame
Copy link
Contributor

icyflame commented Jul 14, 2019

Using <leader>s on an older version of vim causes an error because of the non-existent trim function. As the plugin still works well without the trim function, it can be called only when it exists and behavior will still be maintained.

The `trim` function was introduced to vim in v8.0.1630 (295ac5ab5). For
older versions, calling the non-existent function throws an error. The
URL generated is still valid, but it might have a few `%20` or `\\`
characters at the end.
@voldikss voldikss merged commit 166644e into voldikss:master Jul 14, 2019
@voldikss

This comment has been minimized.

Copy link
Owner

voldikss commented Jul 14, 2019

Thanks 😊

@icyflame

This comment has been minimized.

Copy link
Contributor Author

icyflame commented Jul 14, 2019

@voldikss That was FAST! 👏 🙇 Thanks for merging!

@icyflame icyflame deleted the icyflame:work-with-old-vim-versions branch Jul 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.