|
Post by Stefan on Apr 20, 2020 8:52:14 GMT -5
Hi Guys,
UNDO is almost perfect, but I'd like to submit the following for consideration.
UNDO Command: Enhancement In line with Windows' convention, I have CTRL+Z mapped to (SaveCursor)(Home)[UNDO](Enter)(RestoreCursor). This works well, unless there is a pending line command.
UNDO could be much more useful if it ignored (or reset) outstanding line commands, especially as they could be squirrelled away far from the current editing position.
I tried various combinations, adding [RESET CMD] to the above mapping, but the outstanding line command always wins, with the rest of the string dumped in the command field. Perhaps UNDO could perform the logic of an 'internal RESET CMD' first?
|
|
|
Post by George on Apr 20, 2020 13:41:21 GMT -5
Robert: Stefan: Not sure about doing all that in the KB routine. Anything's possible, it's a matter of access to the various data structures. My guess is yes, but that's only a guess.
As to UNDO doing an internal RESET, no-go. The UNDO will not even get dispatched till the pending stuff is resolved.
George
|
|
|
Post by mueh on Apr 20, 2020 14:52:21 GMT -5
Stefan: Did you use (SaveCursor)(Home)[res cmd](Enter)[UNDO](Enter)(RestoreCursor) ? this clears pending line cmd's on my test .
Sorry ! Do not know what i tested yesterday . it clears the pending cmd's but UNDO is not done today . Maybe i keyed in UNDO after above .
Can you eperiment with (SaveCursor)(Home)[UNDO](Enter)(Home)[res cmd](Enter)[UNDO](Enter)(RestoreCursor) if it solves your Problem . 1'st hit should reset line cmd's next hit's should execute the UNDO .
|
|
|
Post by Stefan on Apr 21, 2020 8:14:04 GMT -5
George,Robert,mueh RE: "(PA1)" As I understand it, PA1 effectively does a 'Reshow'. Hence it is ineffective against a pending line command entered in a previous interaction with SPFLite. I have (sort of) managed to circumvent the issue. The following sequence does what I need, albeit being a little clunky. Thank you mueh, I've adapted your suggestion to: (SaveCursor)(Home)[RESET CMD](Enter)[UNDO](Enter)[UNDO](Enter)(RestoreCursor) It seems I need an (Enter), as opposed to simply a semicolon, after every command and I need two UNDO commands as the first seems to target the RESET.
I no longer have a direct 1:1 relationship with entered changes when pressing the CTRL-Z repeatedly, but by increasing the UNDO count a little, it should be practical enough.
|
|
|
Post by George on Apr 21, 2020 10:16:19 GMT -5
I did a post yesterday (unless I'm losing my mind) but it doesn't seem to be around.
There will be a (ResetCmd) primitive in the next release to clear pending line commands.
George
|
|