{"action":"created","issue":{"url":"https://api.github.com/repos/BetterThanTomorrow/calva-paredit/issues/14","repository_url":"https://api.github.com/repos/BetterThanTomorrow/calva-paredit","labels_url":"https://api.github.com/repos/BetterThanTomorrow/calva-paredit/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/BetterThanTomorrow/calva-paredit/issues/14/comments","events_url":"https://api.github.com/repos/BetterThanTomorrow/calva-paredit/issues/14/events","html_url":"https://github.com/BetterThanTomorrow/calva-paredit/issues/14","id":374950125,"node_id":"MDU6SXNzdWUzNzQ5NTAxMjU=","number":14,"title":"Strict mode prohibits ”legal” deletions of selected text","user":{"login":"PEZ","id":30010,"node_id":"MDQ6VXNlcjMwMDEw","avatar_url":"https://avatars2.githubusercontent.com/u/30010?v=4","gravatar_id":"","url":"https://api.github.com/users/PEZ","html_url":"https://github.com/PEZ","followers_url":"https://api.github.com/users/PEZ/followers","following_url":"https://api.github.com/users/PEZ/following{/other_user}","gists_url":"https://api.github.com/users/PEZ/gists{/gist_id}","starred_url":"https://api.github.com/users/PEZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PEZ/subscriptions","organizations_url":"https://api.github.com/users/PEZ/orgs","repos_url":"https://api.github.com/users/PEZ/repos","events_url":"https://api.github.com/users/PEZ/events{/privacy}","received_events_url":"https://api.github.com/users/PEZ/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-29T10:32:25Z","updated_at":"2018-10-29T13:37:27Z","closed_at":null,"author_association":"COLLABORATOR","body":"Hitting backspace with `(foo)` selected:\r\n\r\n**Expected**: `(foo)` is deleted.\r\n\r\n**Actual**: `(foo)` is not deleted and the cursor is moved to the end of the selection.\r\n\r\n**Further**: If the selection starts at end of `(foo)` (the user selects from there and to the start of the text), and you hit backspace, then the character before `(foo)` is deleted (if allowed by struct mode).\r\n\r\nPreferrably strict mode should refuse to delete the selection if it would unbalance things and leave the selection intact. Otherwise just delete the selection. This is how [the demo of paredit.js](https://robert.kra.hn/past-projects/paredit-js.html) behaves.\r\n\r\nSecond best would be to not use strict mode for selection deletions. (Quite a lot less best than remaining strict, but anyway.)"},"comment":{"url":"https://api.github.com/repos/BetterThanTomorrow/calva-paredit/issues/comments/433912461","html_url":"https://github.com/BetterThanTomorrow/calva-paredit/issues/14#issuecomment-433912461","issue_url":"https://api.github.com/repos/BetterThanTomorrow/calva-paredit/issues/14","id":433912461,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzkxMjQ2MQ==","user":{"login":"PEZ","id":30010,"node_id":"MDQ6VXNlcjMwMDEw","avatar_url":"https://avatars2.githubusercontent.com/u/30010?v=4","gravatar_id":"","url":"https://api.github.com/users/PEZ","html_url":"https://github.com/PEZ","followers_url":"https://api.github.com/users/PEZ/followers","following_url":"https://api.github.com/users/PEZ/following{/other_user}","gists_url":"https://api.github.com/users/PEZ/gists{/gist_id}","starred_url":"https://api.github.com/users/PEZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PEZ/subscriptions","organizations_url":"https://api.github.com/users/PEZ/orgs","repos_url":"https://api.github.com/users/PEZ/repos","events_url":"https://api.github.com/users/PEZ/events{/privacy}","received_events_url":"https://api.github.com/users/PEZ/received_events","type":"User","site_admin":false},"created_at":"2018-10-29T13:37:27Z","updated_at":"2018-10-29T13:37:27Z","author_association":"COLLABORATOR","body":"And now temporarily disabled strict mode as default. While we figure this out.\r\n\r\nHave found out this, so far:\r\n1. Strict mode deletion does not work when text is selected (see above)\r\n2. Strict mode deletion does not work when we have multiple selections/cursors (this would possibly be awesome to support, but is probably tricky)\r\n3. Strict mode deletion does not work in situations where the succeeding format of the range resets the delete.\r\n\r\nAs for number 3, this is an example, try hit backspace in this situation (vertical bar shows the cursor):\r\n```clojure\r\n(let [foo 1\r\n     |bar 2])\r\n```"}}
{"actor":{"display_login":"PEZ"}}