It appears that the line fails IF your cursor is sitting in a Comment at the time.
Looking at the line of code I would have to say that it should be independent of where the cursor happens to be sitting but that won't be a soapbox worth standing on.
Just add a line in front of it that selects something in the body of the document and move along - some things are not worth losing sleep over.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
|