{"action":"created","issue":{"url":"https://api.github.com/repos/MidnightCommander/mc/issues/49","labels_url":"https://api.github.com/repos/MidnightCommander/mc/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/MidnightCommander/mc/issues/49/comments","events_url":"https://api.github.com/repos/MidnightCommander/mc/issues/49/events","html_url":"https://github.com/MidnightCommander/mc/pull/49","id":51192540,"number":49,"title":"Updated fix for #1652: autodetect line breaks type in editor","user":{"login":"pfalcon","id":500451,"avatar_url":"https://avatars.githubusercontent.com/u/500451?v=3","gravatar_id":"","url":"https://api.github.com/users/pfalcon","html_url":"https://github.com/pfalcon","followers_url":"https://api.github.com/users/pfalcon/followers","following_url":"https://api.github.com/users/pfalcon/following{/other_user}","gists_url":"https://api.github.com/users/pfalcon/gists{/gist_id}","starred_url":"https://api.github.com/users/pfalcon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfalcon/subscriptions","organizations_url":"https://api.github.com/users/pfalcon/orgs","repos_url":"https://api.github.com/users/pfalcon/repos","events_url":"https://api.github.com/users/pfalcon/events{/privacy}","received_events_url":"https://api.github.com/users/pfalcon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2014-12-06T19:07:39Z","updated_at":"2015-05-30T11:43:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/MidnightCommander/mc/pulls/49","html_url":"https://github.com/MidnightCommander/mc/pull/49","diff_url":"https://github.com/MidnightCommander/mc/pull/49.diff","patch_url":"https://github.com/MidnightCommander/mc/pull/49.patch"},"body":"This is rebased and updated branch https://github.com/MidnightCommander/mc/tree/1652_autodetect_lb , addressing bugreport http://www.midnight-commander.org/ticket/1652 .\r\n\r\nIt consists of rebasing to the latest codebase original patches (editor functionality by myself, editor options by Ilia Maslakov, line break detection unit tests by Slava Zanko), and additional changes to make linebreak type detection much more conservative and robust (plus some refactoring of unittests).\r\n\r\nThis patcheset adheres to following requirements:\r\n\r\n1. By default, linebreak type autodetection is off, and editor behavior is fully as before (including binary-safety, etc.)\r\n2. When autodetection is on, it is done in conservative manner: bigger sampling buffer size is used to increase confidence; a non-default linebreak type is chosen only if it there was no conflicts in detection; any suspicion that file is binary disables detection. If any of the above conditions are not met, file is loaded with default \"as is\" line break type (which is the original, binary-safe mode).\r\n"},"comment":{"url":"https://api.github.com/repos/MidnightCommander/mc/issues/comments/107029731","html_url":"https://github.com/MidnightCommander/mc/pull/49#issuecomment-107029731","issue_url":"https://api.github.com/repos/MidnightCommander/mc/issues/49","id":107029731,"user":{"login":"pfalcon","id":500451,"avatar_url":"https://avatars.githubusercontent.com/u/500451?v=3","gravatar_id":"","url":"https://api.github.com/users/pfalcon","html_url":"https://github.com/pfalcon","followers_url":"https://api.github.com/users/pfalcon/followers","following_url":"https://api.github.com/users/pfalcon/following{/other_user}","gists_url":"https://api.github.com/users/pfalcon/gists{/gist_id}","starred_url":"https://api.github.com/users/pfalcon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfalcon/subscriptions","organizations_url":"https://api.github.com/users/pfalcon/orgs","repos_url":"https://api.github.com/users/pfalcon/repos","events_url":"https://api.github.com/users/pfalcon/events{/privacy}","received_events_url":"https://api.github.com/users/pfalcon/received_events","type":"User","site_admin":false},"created_at":"2015-05-30T11:43:29Z","updated_at":"2015-05-30T11:43:29Z","body":"> i don't find this strange at all. seriously, if you want a real text editor, by all means, use one. i use mcedit only for quick edits of more or less random files - and i know i can trust it to behave consistently irrespective of file type and not mess up the file.\r\n\r\nAnd I use mc as a super-IDE for all my development work, thru the years, leaving behind vims, emacses, ideas, eclipses, and other \"exciting-new\" stuff popping up and down thru the time. So, as a casual mc user (feel free to skip arguing on this definition, you said what you said with your \"quick edits\") you will keep the behavior you're used to. And core users, like myself, will be able to work with real-world text files adequately. So, proposed compromise looks very viable in practice.\r\n"}}