NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Veteran

Joined: 26 Dec 2006
Posts: 253
Location: Phoenix, AZ
Reply with quote
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:
Code:
a
b
c
d
e
f

Select all five lines and type:
Code:
1
2
3
4
5


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:
Code:
This is a test.

Double-click 'test' to select it and type:
Code:
document

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:
Code:
foo()
bar()
baz()

Select all three lines and note the state: three lines, all selected. Type:
Code:
oops

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 Wink

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 Wink.
View user's profileFind all posts by bobwilliamsSend private messageVisit poster's website


Joined: 14 Mar 2007
Posts: 10
Reply with quote
I'm not a native speaker, so I'm not sure, if this curious behaviour was reported.

Just type some text in the editor,
mark some text and paste it, whether with strg-c/v or context-menu.

By pressing strg-z the cursor just jumps over the text without doing any changes (expect for removing the pasted text).

Well, in this case I'm 100% sure, that I never have been confronted with this behaviour on other IDEs/Editors.

Installed PhpED-Version: 5.0.1, Build 5029.


Best Regards



ps. is there a list with upcoming or planned features for the future?
View user's profileFind all posts by manchildSend private message


Joined: 15 Sep 2007
Posts: 6
Reply with quote
I just recently purchased PhpED and so far I think it's a great editor, but the first the I noticed was this undo/redo strangeness. The behavior definitely can cause you to lose code, it happened to me today. I noticed that I had accidentally deleted a line. The deleted lined of code occurred previous to about 3 or 4 lines of code I had just written. So I just hit undo until my deleted line of code reappeared and then copied it. However, when I hit redo, nothing happened. Those 3 or 4 lines of code I had written after that line I accidentally deleted are now gone, which is a big problem. Not being able to redo after a copy seems rather odd to me and really caught me by surprise - I'll have to be careful from now on I guess. Next time this happens, I guess the only way around the problem for now is to undo until I get to the deleted line of code, then copy it using pen and paper (or take a screen shot), and then hit redo to get those lines of code back. Hopefully this undo/redo problem will be fixed in a future update/release.
View user's profileFind all posts by ldemonSend private message


Joined: 21 Sep 2007
Posts: 4
Reply with quote
My question is, when can we expect Redo to be fixed? I find it annoying, and I'm only evaluating. It will be considered in my decision to buy or not. If it's in the next month or so, I'll overlook it, if it's much more than that, not sure I'm interested.
View user's profileFind all posts by couloir007Send private message
Site Admin

Joined: 13 Jul 2003
Posts: 7861
Reply with quote
Redo/Undo algorithms will be re-worked for the next major version release. Stay tuned Exclamation

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 7861
Reply with quote
As of PhpED v5.2, all the issues with REDO+OptimalFill+KeepTrailing blanks are completely resolved.
No problems are there anymore.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
undo/redo as in other apps please


Joined: 29 Mar 2008
Posts: 2
Location: Trois-Rivières, Qc, Ca
Reply with quote
Please make your undo/redo feature as it is in most applications, so it keeps and offers way to undo changes, not movements...
It's not that hard to change the way your steps are defined, only how each steps are created and what informations it contains...
Since cursor should follow changes done by undo/redo, as a parameter of "last change" or "next change", there is no logical way to figure why the movements alone are kepts, but to make this function far from being trivial...
View user's profileFind all posts by adoxeSend private messageMSN MessengerICQ Number
Site Admin

Joined: 13 Jul 2003
Posts: 7861
Reply with quote
Quote:
Please make your undo/redo feature as it is in most applications, so it keeps and offers way to undo changes, not movements...

All successive cursor movements are remembered as just one and will be unrolled during undo/redo at once.
I believe this serivices all our customers the best.

Quote:
there is no logical way to figure why the movements alone are kepts

feel free to read this forum to find the answers. It was discussed many times.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
[resolved] Undo/redo
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 2 of 2  

  
  
 Reply to topic