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 (another) issue with undoing auto-format #3702

Merged
merged 1 commit into from Aug 23, 2015

Conversation

Projects
None yet
2 participants
@joelmoniz
Member

joelmoniz commented Aug 23, 2015

This PR fixes the (second) "undo-autoformat-clears-text" issue triggered as described here.

benfry added a commit that referenced this pull request Aug 23, 2015

Merge pull request #3702 from joelmoniz/bugfix-autoformatUndo2
Fix (another) issue with undoing auto-format

@benfry benfry merged commit 528a3a1 into processing:master Aug 23, 2015

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Aug 23, 2015

Member

Thanks, I've moved the endTextEditHistory() to startCompoundEdit() so it'll always work this way (unless you can see any reason why we shouldn't?)

Member

benfry commented Aug 23, 2015

Thanks, I've moved the endTextEditHistory() to startCompoundEdit() so it'll always work this way (unless you can see any reason why we shouldn't?)

@joelmoniz joelmoniz deleted the joelmoniz:bugfix-autoformatUndo2 branch Aug 23, 2015

@joelmoniz

This comment has been minimized.

Show comment
Hide comment
@joelmoniz

joelmoniz Aug 23, 2015

Member

Oh yes, that's good, I can't think of any reason not to do this.

NB: Perhaps the stopCompundEdit() call can be removed, since endTextEditHistory() calls stopCompundEdit() from within it (although it doesn't make much difference, since stopCompundEdit() accounts for the possibility of it being called multiple times). Shall I submit a quick PR for this?

Member

joelmoniz commented Aug 23, 2015

Oh yes, that's good, I can't think of any reason not to do this.

NB: Perhaps the stopCompundEdit() call can be removed, since endTextEditHistory() calls stopCompundEdit() from within it (although it doesn't make much difference, since stopCompundEdit() accounts for the possibility of it being called multiple times). Shall I submit a quick PR for this?

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Aug 23, 2015

Member

Good point; I've just made the change and we should be all set.

Member

benfry commented Aug 23, 2015

Good point; I've just made the change and we should be all set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment