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

Prevent yas-new-snippet inserting region twice #1102

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mosquito-magnet
Copy link

On yas-new-snippet, if yas-wrap-around-region is t and
yas-new-snippet-default has its default value, the selected region is
inserted twice: Once for yas-selected-text and once for $0.

The yas-new-snippet-default snippet is a special usage scenario, where
values of yas-wrap-around-region other than nil don't make much sense,
so override it.

On yas-new-snippet, if yas-wrap-around-region is t and
yas-new-snippet-default has its default value, the selected region is
inserted twice: Once for yas-selected-text and once for $0.

The yas-new-snippet-default snippet is a special usage scenario, where
values of yas-wrap-around-region other than nil don't make much sense,
so override it.
@nfedyashev
Copy link

+1 I also have this issue. Thanks for working on it @mosquito-magnet

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.

2 participants