Text Substitution Off-By-One Issue with Applescript Directive Expansion Tag

I have the following text substitution used for a custom display dialog (set to the shortcut dd):

[[*usescriptingadditions]][[*library:GL::General Library]]display dialog "[[template:message]]" with title (my name as string) with icon (GL's APPLESCRIPT_ICON) buttons {"Cancel", "OK"} default button 2

When using this for the first time in an empty document, the selection is erroneously set to the expansion tag [[template:message]] AND the left quote present outside the tag:

When using the text expansion a second time (where the two AppleScript directives do not cause any lines to be added), the initial selection is correct:

The off-by-one error with the selection appears to be caused by the script library directive: [[*library:GL::General Library]]

Shane/Mark, is this something you can reproduce on your end? I’m on v8.0.6 on an M1 MBP.

Yes it is. I’ll take a look, thanks.

This should be fixed in the next maintenance release.

1 Like

The issue has been resolved in Script Debugger 8.0.7. Thanks for addressing this!