I have a script that finds and selects specific text in a source file. However, the selection process only works as expected if TextEd is in "normal" select mode when the script is run. So, I'd like to do one of the following:
1. Have the script determine the current selection mode, change it if needed, run as normal, and return to the previous selection mode. Currently however, I don't think it's possible to a) determine current selection mode, or b) change the selection mode.
2. Employ a selection method that will work as expected regardless of the current selection mode.
I'm attempting to write a script that will select the entire method that contains insertion cursor. Looking at the scripting docs, GetMethodAtCursor(True) sounds like exactly what I need.