{"action":"created","issue":{"url":"https://api.github.com/repos/atom/settings-view/issues/237","labels_url":"https://api.github.com/repos/atom/settings-view/issues/237/labels{/name}","comments_url":"https://api.github.com/repos/atom/settings-view/issues/237/comments","events_url":"https://api.github.com/repos/atom/settings-view/issues/237/events","html_url":"https://github.com/atom/settings-view/issues/237","id":42061186,"number":237,"title":"Opening Settings View clobbers my Invisibles setting","user":{"login":"lee-dohm","id":1038121,"avatar_url":"https://avatars.githubusercontent.com/u/1038121?v=3","gravatar_id":"","url":"https://api.github.com/users/lee-dohm","html_url":"https://github.com/lee-dohm","followers_url":"https://api.github.com/users/lee-dohm/followers","following_url":"https://api.github.com/users/lee-dohm/following{/other_user}","gists_url":"https://api.github.com/users/lee-dohm/gists{/gist_id}","starred_url":"https://api.github.com/users/lee-dohm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lee-dohm/subscriptions","organizations_url":"https://api.github.com/users/lee-dohm/orgs","repos_url":"https://api.github.com/users/lee-dohm/repos","events_url":"https://api.github.com/users/lee-dohm/events{/privacy}","received_events_url":"https://api.github.com/users/lee-dohm/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/atom/settings-view/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-09-05T15:57:25Z","updated_at":"2015-03-22T12:44:22Z","closed_at":null,"body":"I like to have \"Show Invisibles\" on, but I don't like seeing the line ending unless it includes a CR (which is an improper line ending for my files). So I disable the \"EOL\" line ending character by setting it to empty. But with a recent change to Settings View (haven't tracked down exactly which yet), EOL gets set to the default because empty is treated as equivalent.\r\n\r\nAtom Version:  0.125.0-805c62\r\nOS Version: OS X 10.9.4\r\n\r\n## Repro Steps\r\n\r\n1. Edit `config.cson` to set `editor.invisibles.eol` to be `''`\r\n1. Open Settings View\r\n\r\n**Expected:** Line Endings EOL setting should be empty\r\n**Actual:** Line Endings EOL setting shows as `Default: ¬`\r\n\r\n1. Close Settings View\r\n1. Open `config.cson`\r\n\r\n**Expected:** `editor.invisibles.eol` should be `''`\r\n**Actual:** `editor.invisibles.eol` has been removed (which sets it to the default)\r\n\r\n## Workaround\r\n\r\nI suppose a workaround is to set the EOL character to a space character of some sort zero-width or otherwise (although now I'm wondering if the input in the boxes is trimmed and then we're back to square one), but long-term I think there should be a method to differentiate between the empty string and \"set this to the default\".\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/atom/settings-view/issues/comments/84600504","html_url":"https://github.com/atom/settings-view/issues/237#issuecomment-84600504","issue_url":"https://api.github.com/repos/atom/settings-view/issues/237","id":84600504,"user":{"login":"hmemcpy","id":601206,"avatar_url":"https://avatars.githubusercontent.com/u/601206?v=3","gravatar_id":"","url":"https://api.github.com/users/hmemcpy","html_url":"https://github.com/hmemcpy","followers_url":"https://api.github.com/users/hmemcpy/followers","following_url":"https://api.github.com/users/hmemcpy/following{/other_user}","gists_url":"https://api.github.com/users/hmemcpy/gists{/gist_id}","starred_url":"https://api.github.com/users/hmemcpy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmemcpy/subscriptions","organizations_url":"https://api.github.com/users/hmemcpy/orgs","repos_url":"https://api.github.com/users/hmemcpy/repos","events_url":"https://api.github.com/users/hmemcpy/events{/privacy}","received_events_url":"https://api.github.com/users/hmemcpy/received_events","type":"User","site_admin":false},"created_at":"2015-03-22T12:44:22Z","updated_at":"2015-03-22T12:44:22Z","body":"I figured it out!\r\n\r\nI had the same problem (issue https://github.com/atom/atom/issues/6033), I couldn't understand why opening and closing the settings tab removed my `invisibles`. Turns out, much like @lee-dohm, I set some of the characters to `''`, e.g.:\r\n```cson\r\n\"*\":\r\n  editor:\r\n    invisibles:\r\n      eol: ''\r\n      cr: ''\r\n      ...\r\n```\r\nTurns out, after reading the [settings schema](https://github.com/atom/atom/blob/master/src/config-schema.coffee#L178-192), that `invisibles` support boolean toggles. So after writing the settings like so:\r\n```cson\r\n\"*\":\r\n  editor:\r\n    invisibles:\r\n      eol: false\r\n      cr: false\r\n      ...\r\n```\r\nThis configuration remains even after opening and closing the Settings tab.\r\n\r\nSo the bug is with handling the default values of `invisibles` when they are empty strings!\r\n"}}