Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix inconsistent behaviour of undo #19

Closed
subogero opened this issue Jul 24, 2013 · 0 comments
Closed

Fix inconsistent behaviour of undo #19

subogero opened this issue Jul 24, 2013 · 0 comments
Assignees
Milestone

Comments

@subogero
Copy link
Owner

Symptoms: undo skips some previous outputs.
Reason: outputPop() was wrong to assume that the stack was dirty at any time.
In fact output and the top of the stack were equal after each statement.
Therefore the double-pop was insane.
Pop was setting output from the top of the stack, and then discard the top.

Fix: discard stack-top first, then copy new top to output.

@ghost ghost assigned subogero Jul 24, 2013
subogero added a commit that referenced this issue Jul 24, 2013
output stack: Remove the redundant dirty-mechanism.
It was a failed attempt to fix the wrong Pop() behaviour:
copy top - discard top.
Instead do: discard top - copy new top.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant