Skip to content

Pull all recent updates #121

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

Merged
merged 9 commits into from
Oct 23, 2019
Merged

Pull all recent updates #121

merged 9 commits into from
Oct 23, 2019

Conversation

Cimbali
Copy link
Collaborator

@Cimbali Cimbali commented Oct 23, 2019

Includes

Ignores aliases set in the shell by default, which closes ntpeters#109
Frees up :match for other uses, as seen in ntpeters#98, also less :exe.

A single matchadd() id should be used because matchadd() goes over from
one buffer to the next, so creating a new id causes
matchadd/matchdelete calls to not work as expected.

It seems that using the same match id across buffers does not seem to
interfere with other open buffers, neither in tabs nor splits.
Disabling the plugin ≠ disabling the functionality. Fixes ntpeters#114
Our trim() substitute needs to handle new lines as well, otherwise it
returns a string with just a new line, which then causes problems.
Disabling the plugin ≠ disabling the functionality. Fixes ntpeters#114
@therealjumbo
Copy link

therealjumbo commented Oct 23, 2019

This fixes #120. However, would it be better to do function detection: https://stackoverflow.com/a/13710385/2839477 instead of version checking? Since for nvim the version check is failing and then it's using the fallback, but nvim actually does have the trim function available.

This allows the check to be correct on vim variants that do not follow
the version scheme, e.g. nvim. As suggested by @therealjumbo on ntpeters#121.
" Function to implement trim() fro vim < 8.0.1630
if v:version > 800 || (v:version == 800 && has('patch-1630'))
" Function to implement trim() if it does not exist
if exists('*trim')

Choose a reason for hiding this comment

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

I tested this, and in nvim, it is correctly using this case now.

@therealjumbo
Copy link

Thanks for the quick turnaround, I'm using your fork/branch until this gets merged. Hopefully soon-ish :)

@ntpeters
Copy link
Owner

Thanks for collecting these into a single PR to make the review easier! ❤️

Instead of diff which may be aliased in some way, e.g. diff.cmd
See ntpeters#121, ntpeters#111 and ntpeters#109.
@Cimbali Cimbali requested a review from ntpeters October 23, 2019 22:12
Copy link
Owner

@ntpeters ntpeters left a comment

Choose a reason for hiding this comment

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

:shipit:

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.

3 participants