Do not create undoable commands everytime we type a separator. Having this, we can do in-place find/replace of sequences with whitespace again such as selecting "first" and replacing it with "at: 1" followed by hitting CTRL+J or CTRL+SHIFT+J to do the replacement again.
Note that commands will still end if the user changes the selection by, for example, moving the text cursor. Or when deleting things via backspace. Or when inserting stuff from the clipboard, or
This is an improvement, thanks, but one thing I don't understand is why this function is tied to the unit-of-Undo..? Because, in the old S&R all of the above used to work.
Replacing a selection with [Backspace] is how I handle S&R's in which I need to simply remove chunks of text.
Also, sometimes the replacement text is a complex String that is very onerous to type, so pasting from the clipboard must work too.
One more case, in the old S&R, one could be typing the replacement text and, if a typo occurred, no problem! Backspace, correct, keep typing, and the system was amazingly smart enough to do it right.
I don't know how it did it but it was brilliant..
... just look for senders of #closeTypeIn or #insertAndCloseTypeIn to get the idea.
It was crap. The old implementation produced nightmares when reading the code. Global state. Many side effects. I think the functionality was accidential at best. --- No puns intended! :)
So you want to also do backspace for in-place find/replace? Puh... let me think...
@all: No, using a time slice for unit-of-undo is not working. It will never please both the slow and the fast typers.
Best, Marcel
-- View this message in context: http://forum.world.st/The-Trunk-Morphic-mt-1054-mcz-tp4862936p4863250.html Sent from the Squeak - Dev mailing list archive at Nabble.com.
On 25.11.2015, at 10:07, marcel.taeumel Marcel.Taeumel@hpi.de wrote:
It was crap. The old implementation produced nightmares when reading the code. Global state. Many side effects. I think the functionality was accidential at best. --- No puns intended! :)
So you want to also do backspace for in-place find/replace? Puh... let me think...
Me also want :)
@all: No, using a time slice for unit-of-undo is not working. It will never please both the slow and the fast typers.
Best, Marcel
-- View this message in context: http://forum.world.st/The-Trunk-Morphic-mt-1054-mcz-tp4862936p4863250.html Sent from the Squeak - Dev mailing list archive at Nabble.com.
On 25.11.2015, at 10:07, marcel.taeumel Marcel.Taeumel@hpi.de wrote:
It was crap. The old implementation produced nightmares when reading the code. Global state. Many side effects. I think the functionality was accidential at best. --- No puns intended! :)
This code was really old, from a time where code
So you want to also do backspace for in-place find/replace?
Yep.
Puh... let me think...
@all: No, using a time slice for unit-of-undo is not working. It will never please both the slow and the fast typers.
Agreed. But supporting backspace did not depend on timing - or did I misunderstand you?
- Bert -
Hi --
I think it's just about how many commands to "do again". I will try looking and the intervals edited to determine the actual find-string and replace-string.
For example: As long as the intervals overlap or are contiguous, we may condense them. This could work.
Best, Marcel
-- View this message in context: http://forum.world.st/The-Trunk-Morphic-mt-1054-mcz-tp4862936p4863597.html Sent from the Squeak - Dev mailing list archive at Nabble.com.
squeak-dev@lists.squeakfoundation.org