dmitri wrote: |
These posts has no relation, absolutely. |
If that's what you think, then please go re-read them again. They most certainly do relate.
Quote: |
They are about very different issue caused by implemetation problems in the editor when "Keep trailing spaces" is off and/or "Optimal fill" is on.
Just do not change these two settings and you will never get any problems with UNDO. But it has no relation with REDO availablity after cursor movements that we are discussing in this topic. |
I set "Keep trailing blanks" (which I assume is what you meant) to on and "Optimal fill" to off and tested some of the ideas in those threads.
Test number 1:
Type:
Select all five lines and type:
Hit undo until you see the first set of lines again. Select and copy them to the clipboard. Now try to redo to get back to the second set of lines. For me, I cannot redo because the act of selecting the lines (without changing the content) changed the undo/redo stack. Result: I've lost the second set of lines. In other editors, I would be able to get right back to the second set of lines and continue with my coding, probably by pasting in the first set somewhere.
What happens for you?
Do you think the behavior I'm seeing is a good thing?
Test number 2:
Type:
Double-click 'test' to select it and type:
Now, right-click somewhere, even right on the word 'document', and select Undo from the contextual menu. Do this as many times you please. What happens? For me, absolutely nothing happens, because the right click-click repositions the cursor, which affects the undo/redo stack, which means you can select Undo until you're green, and nothing will happen.
Now, repeat the text, but instead of right-clicking to select Undo, type ctrl-z. For me, I end up with the original line again, just as expected.
Do you think the behavior I'm seeing is a good thing?
And, what is the purpose of having Undo in the editing area's contextual menu if it cannot be used to undo edits?
Test number 3:
Type:
Select all three lines and note the state: three lines, all selected. Type:
Now hit undo. The state: the previous three lines, none selected. The selection is not restored. In the best editors I've used, the current selection state is saved with undo states (though only when an undo state is otherwise warranted!), so that when you hit undo after typing 'oops', the three lines will again be selected. As I said, though, I've only seen this in the best editors, like BBEdit, which means most don't do it. It'd be nice if PhpED did, but not essential. I do find it odd, though, that it saves every cursor movement in undo, but not the selection.
Quote: |
Please give a try and make sure you can replicate the "potential" problems you're talking about before post  |
Now it's your turn to replicate them; what do you see in each of the above cases?
Incidentally, if those features did cause the problems we're seeing with undo, I'd hope you'd disable them, or least document the issues very clearly somewhere.
As an aside: sometimes, Dmitri, I think you just read through folks' posts too fast and miss important details, or even the whole concept of what they're saying or what they're asking for. I understand your hurry--you're responding to tons of posts while you continue to put in time developing the IDE--but you might want to slow down just a bit when something keeps getting brought up. There could be other issues, as well. Perhaps English isn't your first language, and that creates some issues; I'm not sure what to tell you here, as there's not much you can do except maybe ask us for clarification or just to restate ourselves a different way. Don't get me wrong: you're often very helpful, and I really appreciate all that you do and the work you put into PhpED, but there are times now and then when your responses are so out of line with what was originally written that it seems like you either didn't read it very well or just misunderstood it. And again, I completely understand how this happens; were I in your shoes, I'd do it too, I'm sure. I'm just asking for something a little closer to perfection from you, that's all

.