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

Fix the scope of several key mappings #1151

Merged
merged 5 commits into from
Jul 12, 2020
Merged

Fix the scope of several key mappings #1151

merged 5 commits into from
Jul 12, 2020

Conversation

PhilRunninger
Copy link
Member

@PhilRunninger PhilRunninger commented Jul 12, 2020

Description of Changes

Closes #1149

This pull request changes the scope of some of the key mappings. Prior to this, they were scoped to run on all node types: directory and file. But they didn't make sense to be run on directory nodes, as this creates another NERDTree in the new window. The key mappings whose scopes were changed are: i, s, gi, gs, and go. They now work only on file nodes and file bookmarks.

When testing, it was discovered that the go command on directory bookmarks wasn't working correctly (probably because NERDTreeFind was changed some time back). Therefore, s:previewBookmark() was rewritten so that the bookmark directory would become the root of the NERDTree.


New Version Info

Author's Instructions

  • Derive a new MAJOR.MINOR.PATCH version number. Increment the:
    • MAJOR version when you make incompatible API changes
    • MINOR version when you add functionality in a backwards-compatible manner
    • PATCH version when you make backwards-compatible bug fixes
  • Update CHANGELOG.md, following the established pattern.

Collaborator's Instructions

  • Review CHANGELOG.md, suggesting a different version number if necessary.
  • After merge, tag the merge commit, e.g. git tag -a 3.1.4 -m "v3.1.4" && git push origin --tags

@PhilRunninger PhilRunninger requested a review from lifecrisis July 12, 2020 00:34
lifecrisis
lifecrisis previously approved these changes Jul 12, 2020
Copy link
Contributor

@lifecrisis lifecrisis left a comment

Choose a reason for hiding this comment

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

This all looks good to me. I did look at the documentation, and I don't think anything there needs to be updated. @PhilRunninger, you might ought to check just to be sure I didn't miss anything.

The docs do confirm, for example, that the intended behavior of i is to operate only on files and bookmarks, not directories. Thus, this PR is in line with the contract that our documentation provides.

Copy link
Contributor

@lifecrisis lifecrisis left a comment

Choose a reason for hiding this comment

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

Looks great, @PhilRunninger! Thanks!

@PhilRunninger PhilRunninger merged commit aa37cb4 into master Jul 12, 2020
@PhilRunninger PhilRunninger deleted the i1149 branch July 12, 2020 14:03
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.

Incorrect scope used for some mappings
2 participants