{"action":"created","issue":{"url":"https://api.github.com/repos/bonecode/TBCEditor/issues/75","labels_url":"https://api.github.com/repos/bonecode/TBCEditor/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/bonecode/TBCEditor/issues/75/comments","events_url":"https://api.github.com/repos/bonecode/TBCEditor/issues/75/events","html_url":"https://github.com/bonecode/TBCEditor/issues/75","id":77704190,"number":75,"title":"Undo/Redo grouping is not coherent","user":{"login":"EricGrange","id":2197210,"avatar_url":"https://avatars.githubusercontent.com/u/2197210?v=3","gravatar_id":"","url":"https://api.github.com/users/EricGrange","html_url":"https://github.com/EricGrange","followers_url":"https://api.github.com/users/EricGrange/followers","following_url":"https://api.github.com/users/EricGrange/following{/other_user}","gists_url":"https://api.github.com/users/EricGrange/gists{/gist_id}","starred_url":"https://api.github.com/users/EricGrange/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EricGrange/subscriptions","organizations_url":"https://api.github.com/users/EricGrange/orgs","repos_url":"https://api.github.com/users/EricGrange/repos","events_url":"https://api.github.com/users/EricGrange/events{/privacy}","received_events_url":"https://api.github.com/users/EricGrange/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-18T15:40:59Z","updated_at":"2015-05-19T07:15:47Z","closed_at":null,"body":"In the default snippet, select the writeln in \r\n\r\n    writeln('Hello, world!');\r\n\r\ncopy it, then move you caret between the n and the (, and paste twice\r\n\r\n    writelnwritelnwriteln('Hello, world!');\r\n\r\nnow hit ctrl+z, it takes two ctrl+z to remove the two extra writeln (as expected), but if you now do a redo with ctr+shift+z, both writeln will reappear at the same time"},"comment":{"url":"https://api.github.com/repos/bonecode/TBCEditor/issues/comments/103376470","html_url":"https://github.com/bonecode/TBCEditor/issues/75#issuecomment-103376470","issue_url":"https://api.github.com/repos/bonecode/TBCEditor/issues/75","id":103376470,"user":{"login":"EricGrange","id":2197210,"avatar_url":"https://avatars.githubusercontent.com/u/2197210?v=3","gravatar_id":"","url":"https://api.github.com/users/EricGrange","html_url":"https://github.com/EricGrange","followers_url":"https://api.github.com/users/EricGrange/followers","following_url":"https://api.github.com/users/EricGrange/following{/other_user}","gists_url":"https://api.github.com/users/EricGrange/gists{/gist_id}","starred_url":"https://api.github.com/users/EricGrange/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EricGrange/subscriptions","organizations_url":"https://api.github.com/users/EricGrange/orgs","repos_url":"https://api.github.com/users/EricGrange/repos","events_url":"https://api.github.com/users/EricGrange/events{/privacy}","received_events_url":"https://api.github.com/users/EricGrange/received_events","type":"User","site_admin":false},"created_at":"2015-05-19T07:15:47Z","updated_at":"2015-05-19T07:15:47Z","body":"Currently uoGroupUndo is more of a uoGroupRedo :)\r\n\r\nOne solution is to handle the undo grouping at the time of the action, by bundling it into the previous undo entry rather than creating a new one. This way there is a single place in the code where group undo is managed, and the undo/redo methods can be \"dumb\".\r\n\r\n(this requires having entries that are actually chains of entries, for instance by adding a NextItem in TBCEditorUndoItem, and the grouped entries then do not appear as seperate entries in the undo list)"}}