abo-abo / auto-yasnippet

quickly create disposable yasnippets
246 stars 15 forks source link

Bug: Expanding snippets over a region. #38

Closed jasonm23 closed 2 years ago

jasonm23 commented 2 years ago

Given an auto-snippet which is defined that uses a special yasnippet form (${n:...}) for example when a field has implicit casing rules.

When it is expanded over a region and the special form is on $1

Then it will expand incorrectly.


Triage / root cause summary

During aya-expand if a region is detected the following happens.

In the cases where $1 is a special form, the replacement doesn't happen as planned and this breaks the expansion.

Potential solutions.

YASnippet provides a mechanim for working with a selected region, yas-selected-text and (yas-selected-text)

jasonm23 commented 2 years ago

Fixed in these commits.

c2fcbc149204800fadb57592d4db96f12d55471c

854b1018df044a3df14fb2b83fb058e2c2dc1183

f8bdb785adf4ce364196ee98e93325df22bcf385

850e44f0e1b3a5678590216a98a6c8f3101b2772

5b86d94637249ebf820ec94b8bfb47d6561fa369

c5507344e1ba7ddbce6d755823c2f8503f9e28b4

66c01fd0874c47acccd98992a6cab3a4beca8fd1