{"action":"created","issue":{"url":"https://api.github.com/repos/Alexey-T/CudaText/issues/271","labels_url":"https://api.github.com/repos/Alexey-T/CudaText/issues/271/labels{/name}","comments_url":"https://api.github.com/repos/Alexey-T/CudaText/issues/271/comments","events_url":"https://api.github.com/repos/Alexey-T/CudaText/issues/271/events","html_url":"https://github.com/Alexey-T/CudaText/issues/271","id":127255176,"number":271,"title":"Application freeze on undo command","user":{"login":"eastorwest","id":16493752,"avatar_url":"https://avatars.githubusercontent.com/u/16493752?v=3","gravatar_id":"","url":"https://api.github.com/users/eastorwest","html_url":"https://github.com/eastorwest","followers_url":"https://api.github.com/users/eastorwest/followers","following_url":"https://api.github.com/users/eastorwest/following{/other_user}","gists_url":"https://api.github.com/users/eastorwest/gists{/gist_id}","starred_url":"https://api.github.com/users/eastorwest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eastorwest/subscriptions","organizations_url":"https://api.github.com/users/eastorwest/orgs","repos_url":"https://api.github.com/users/eastorwest/repos","events_url":"https://api.github.com/users/eastorwest/events{/privacy}","received_events_url":"https://api.github.com/users/eastorwest/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-01-18T15:55:36Z","updated_at":"2016-01-20T18:26:52Z","closed_at":null,"body":"CudaText 1.12.15.0 (git), Windows XP SP3\r\nСоздаю новый документ Untitled1. Нажимаю Ctrl+Z и CudaText теряет управление, \"уходит в себя\", висит. Так происходит и после внесения изменений в документ, если многократно повторить команду undo вручную.\r\nВ отладчике нашел предполагаемую причину - бесконечный цикл в методе\r\nTATStrings.DoUndoRedo(AUndo: boolean; AGrouped: boolean);\r\n```Delphi\r\n...\r\n  repeat\r\n    //FUndolist.DebugShow; ////debug\r\n    DoUndoSingle(List, bSoftMarked, bHardMarked, bHardMarkedNext, bMarkedUnmodified);\r\n\r\n    //handle unmodified\r\n    if bMarkedUnmodified then\r\n      FModified:= false;\r\n\r\n    //apply Hardmark to ListOther\r\n    if bHardMarked then\r\n      if ListOther.Count>0 then\r\n      begin\r\n        ListOther.Last.ItemHardMark:= bHardMarked;\r\n        //ListOther.Last.ItemSoftMark:= ?? //for redo needed Softmark too but don't know how\r\n      end;\r\n\r\n    if bHardMarked and bHardMarkedNext and not bSoftMarked then Continue;\r\n    if (not AGrouped) or bSoftMarked then Break;\r\n  until false;\r\n...\r\n```\r\nВ своей сборке исправил в методе  TATStrings.DoUndoSingle(...) перенес строку\r\n```Delphi\r\n  ASoftMarked:= Item.ItemSoftMark; \r\n```\r\nниже строки\r\n```Delphi\r\n  if (NCount=1) and (AUndoList[0].ItemAction=cEditActionClearModified) then exit;\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/Alexey-T/CudaText/issues/comments/173315591","html_url":"https://github.com/Alexey-T/CudaText/issues/271#issuecomment-173315591","issue_url":"https://api.github.com/repos/Alexey-T/CudaText/issues/271","id":173315591,"user":{"login":"Alexey-T","id":4154978,"avatar_url":"https://avatars.githubusercontent.com/u/4154978?v=3","gravatar_id":"","url":"https://api.github.com/users/Alexey-T","html_url":"https://github.com/Alexey-T","followers_url":"https://api.github.com/users/Alexey-T/followers","following_url":"https://api.github.com/users/Alexey-T/following{/other_user}","gists_url":"https://api.github.com/users/Alexey-T/gists{/gist_id}","starred_url":"https://api.github.com/users/Alexey-T/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alexey-T/subscriptions","organizations_url":"https://api.github.com/users/Alexey-T/orgs","repos_url":"https://api.github.com/users/Alexey-T/repos","events_url":"https://api.github.com/users/Alexey-T/events{/privacy}","received_events_url":"https://api.github.com/users/Alexey-T/received_events","type":"User","site_admin":false},"created_at":"2016-01-20T18:26:52Z","updated_at":"2016-01-20T18:26:52Z","body":"сайдбар. он делает список вкладок НО не только. там есть много моментов. посмотрите вот \r\nhttps://www.youtube.com/watch?v=4vUUhP88pEA\r\nя вижу такое- можно открыть папку(не файл) и она вся добавится как папка в сайдбар\r\nесть еще фишки с проектом тоже с сайдбаром но это потом..\r\n\r\nя бы хотел сделать питон api для Дерева. вы бы на этом апи , на Питоне, могли бы сделать фишки Суб с сайдбаром. вот те две. список табов и открыть папку. \r\n\r\nэто как?\r\n\r\n \r\n\r\n"}}