Minor Bug with Text Selection when 'Compiling Escapes Tabs and Line Breaks in Strings' is Enabled

Script Debugger 8 released with the very useful (and very appreciated!) ability to escape tabs & line breaks in strings. I’ve been using that preference ever since the beta & loving every minute of it.

One rough edge I’ve noticed is that double-clicking to select a word immediately following a linefeed (\n) causes the preceding n to also be selected. When typing to replace the selection, this causes the n to be deleted and usually leads to a compilation error (if you don’t catch the accidental deletion). This is obviously not desired behaviour (I would assume it is just inherited behaviour).

Example (double-clicking Total selects nTotal):

Mark/Shane, would it be feasible for the text selection logic of SD to be updated to handle the special AppleScript escape codes? I don’t have a good sense of how complex this would be to implement.

Thanks!

I did look at it ages ago, and at the time it looked a bit tricky because of some of the other stuff we do (ironically I was looking because XCode also selects the n or r, and I use it a lot more there).

2 Likes

Interesting – thanks!

Side note – I finally just “got” your avatar… mate. :smiley:

2 Likes