I'm trying to figure out why the following macros won't "anchor" the selection to the original cursor position. I can get two trivial macros to do so, but some more "advanced" macros won't keep the cursor position anchored. Not sure if this is related to macros themselves, the find dialog, or a combination of the two.
Here are the trivial macros:
http://www.jeffyjeffy.com/textpad/_sele ... o_left.TPM
http://www.jeffyjeffy.com/textpad/_sele ... _right.TPM
They are *really* simple. _select_char_to_right does only one thing: ExtendCharRight. _select_char_to_left does the opposite: ExtendCharLeft.
Put the cursor anywhere in a document, run these macros at will, and you'll see that the cursor "anchors" itself at the original position. I mean that the selection always starts from this original cursor position, no matter how many times/how rapidly/... you use the macros.
But now, I have these "more complicated" macros (steps following each):
http://www.jeffyjeffy.com/textpad/nav_t ... _after.tpm (NTSRA)
Find:
">"
Direction: Down
Extend selection [X]
Wrap Searches [ ]
Regular Expression [ ]
http://www.jeffyjeffy.com/textpad/nav_t ... before.tpm (NTSLB)
Find:
"<"
Direction: Up
Extend selection [X]
Wrap Searches [ ]
Regular Expression [ ]
Open up any HTML document, and put your cursor somewhere in the middle. Now run these macros multiple times, and the selection *does not* anchor itself to the original cursor position. The selection *always* gets larger, no matter which macro you run.
Is this behavior as documented? Is it a bug? Is there some way that I can make the selection anchor itself, despite this? Is it possible to make "anchoring" the standard behavior in future versions? Would there be a reason *not* to do so?
Thanks for your help and advice!
Selection anchoring, macros and the find dialog
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard