{"action":"created","comment":{"url":"https://api.github.com/repos/atom/vim-mode/pulls/comments/27170632","id":27170632,"diff_hunk":"@@ -39,65 +39,179 @@ describe \"Operators\", ->\n \n   describe \"the x keybinding\", ->\n     describe \"on a line with content\", ->\n-      beforeEach ->\n-        editor.setText(\"012345\")\n-        editor.setCursorScreenPosition([0, 4])\n+      describe \"without vim-mode.wrapLeftRightMotion\", ->\n+        beforeEach ->\n+          editor.setText(\"abc\\n012345\\n\\nxyz\")\n+          editor.setCursorScreenPosition([1, 4])\n \n-      it \"deletes a character\", ->\n-        keydown('x')\n-        expect(editor.getText()).toBe '01235'\n-        expect(editor.getCursorScreenPosition()).toEqual [0, 4]\n-        expect(vimState.getRegister('\"').text).toBe '4'\n+        it \"deletes a character\", ->\n+          keydown('x')\n+          expect(editor.getText()).toBe 'abc\\n01235\\n\\nxyz'\n+          expect(editor.getCursorScreenPosition()).toEqual [1, 4]\n+          expect(vimState.getRegister('\"').text).toBe '4'\n \n-        keydown('x')\n-        expect(editor.getText()).toBe '0123'\n-        expect(editor.getCursorScreenPosition()).toEqual [0, 3]\n-        expect(vimState.getRegister('\"').text).toBe '5'\n+          keydown('x')\n+          expect(editor.getText()).toBe 'abc\\n0123\\n\\nxyz'\n+          expect(editor.getCursorScreenPosition()).toEqual [1, 3]\n+          expect(vimState.getRegister('\"').text).toBe '5'\n+\n+          keydown('x')\n+          expect(editor.getText()).toBe 'abc\\n012\\n\\nxyz'\n+          expect(editor.getCursorScreenPosition()).toEqual [1, 2]\n+          expect(vimState.getRegister('\"').text).toBe '3'\n+\n+          keydown('x')\n+          expect(editor.getText()).toBe 'abc\\n01\\n\\nxyz'\n+          expect(editor.getCursorScreenPosition()).toEqual [1, 1]\n+          expect(vimState.getRegister('\"').text).toBe '2'\n+\n+          keydown('x')\n+          expect(editor.getText()).toBe 'abc\\n0\\n\\nxyz'\n+          expect(editor.getCursorScreenPosition()).toEqual [1, 0]\n+          expect(vimState.getRegister('\"').text).toBe '1'\n+\n+          keydown('x')\n+          expect(editor.getText()).toBe 'abc\\n\\n\\nxyz'\n+          expect(editor.getCursorScreenPosition()).toEqual [1, 0]\n+          expect(vimState.getRegister('\"').text).toBe '0'\n+\n+        it \"deletes multiple characters with a count\", ->\n+          keydown('2')\n+          keydown('x')\n+          expect(editor.getText()).toBe 'abc\\n0123\\n\\nxyz'\n+          expect(editor.getCursorScreenPosition()).toEqual [1, 3]\n+          expect(vimState.getRegister('\"').text).toBe '45'\n+\n+          editor.setCursorScreenPosition([0, 1])\n+          keydown('3')\n+          keydown('x')\n+          expect(editor.getText()).toBe 'a\\n0123\\n\\nxyz'\n+          expect(editor.getCursorScreenPosition()).toEqual [0, 0]\n+          expect(vimState.getRegister('\"').text).toBe 'bc'\n+\n+      describe \"with vim-mode.wrapLeftRightMotion\", ->\n+        beforeEach ->\n+          editor.setText(\"abc\\n012345\\n\\nxyz\")\n+          editor.setCursorScreenPosition([1, 4])\n+          atom.config.set('vim-mode.wrapLeftRightMotion', true)\n+\n+        it \"deletes a character\", ->\n+          # copy of the earlier test because wrapLeftRightMotion should not affect it\n+          keydown('x')\n+          expect(editor.getText()).toBe 'abc\\n01235\\n\\nxyz'\n+          expect(editor.getCursorScreenPosition()).toEqual [1, 4]\n+          expect(vimState.getRegister('\"').text).toBe '4'\n+\n+          keydown('x')\n+          expect(editor.getText()).toBe 'abc\\n0123\\n\\nxyz'\n+          expect(editor.getCursorScreenPosition()).toEqual [1, 3]\n+          expect(vimState.getRegister('\"').text).toBe '5'\n+\n+          keydown('x')\n+          expect(editor.getText()).toBe 'abc\\n012\\n\\nxyz'\n+          expect(editor.getCursorScreenPosition()).toEqual [1, 2]\n+          expect(vimState.getRegister('\"').text).toBe '3'\n+\n+          keydown('x')\n+          expect(editor.getText()).toBe 'abc\\n01\\n\\nxyz'\n+          expect(editor.getCursorScreenPosition()).toEqual [1, 1]\n+          expect(vimState.getRegister('\"').text).toBe '2'\n+\n+          keydown('x')\n+          expect(editor.getText()).toBe 'abc\\n0\\n\\nxyz'\n+          expect(editor.getCursorScreenPosition()).toEqual [1, 0]\n+          expect(vimState.getRegister('\"').text).toBe '1'\n+\n+          keydown('x')\n+          expect(editor.getText()).toBe 'abc\\n\\n\\nxyz'\n+          expect(editor.getCursorScreenPosition()).toEqual [1, 0]\n+          expect(vimState.getRegister('\"').text).toBe '0'\n+\n+        it \"deletes multiple characters and newlines with a count\", ->\n+          atom.config.set('vim-mode.wrapLeftRightMotion', true)\n+          keydown('2')\n+          keydown('x')\n+          expect(editor.getText()).toBe 'abc\\n0123\\n\\nxyz'\n+          expect(editor.getCursorScreenPosition()).toEqual [1, 3]\n+          expect(vimState.getRegister('\"').text).toBe '45'\n+\n+          editor.setCursorScreenPosition([0, 1])\n+          keydown('3')\n+          keydown('x')\n+          expect(editor.getText()).toBe 'a0123\\n\\nxyz'\n+          expect(editor.getCursorScreenPosition()).toEqual [0, 1]\n+          expect(vimState.getRegister('\"').text).toBe 'bc\\n'\n+\n+          keydown('7')\n+          keydown('x')\n+          expect(editor.getText()).toBe 'ayz'\n+          expect(editor.getCursorScreenPosition()).toEqual [0, 1]\n+          expect(vimState.getRegister('\"').text).toBe '0123\\n\\nx'","path":"spec/operators-spec.coffee","position":123,"original_position":123,"commit_id":"43f85dbf7e4904f13c208d5539bb9bca6e427613","original_commit_id":"10f22a199080169ee4bb33112c6999474c52b8c0","user":{"login":"jacekkopecky","id":807315,"avatar_url":"https://avatars.githubusercontent.com/u/807315?v=3","gravatar_id":"","url":"https://api.github.com/users/jacekkopecky","html_url":"https://github.com/jacekkopecky","followers_url":"https://api.github.com/users/jacekkopecky/followers","following_url":"https://api.github.com/users/jacekkopecky/following{/other_user}","gists_url":"https://api.github.com/users/jacekkopecky/gists{/gist_id}","starred_url":"https://api.github.com/users/jacekkopecky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacekkopecky/subscriptions","organizations_url":"https://api.github.com/users/jacekkopecky/orgs","repos_url":"https://api.github.com/users/jacekkopecky/repos","events_url":"https://api.github.com/users/jacekkopecky/events{/privacy}","received_events_url":"https://api.github.com/users/jacekkopecky/received_events","type":"User","site_admin":false},"body":"Thanks. 8-)","created_at":"2015-03-25T21:58:32Z","updated_at":"2015-03-25T21:58:32Z","html_url":"https://github.com/atom/vim-mode/pull/555#discussion_r27170632","pull_request_url":"https://api.github.com/repos/atom/vim-mode/pulls/555","_links":{"self":{"href":"https://api.github.com/repos/atom/vim-mode/pulls/comments/27170632"},"html":{"href":"https://github.com/atom/vim-mode/pull/555#discussion_r27170632"},"pull_request":{"href":"https://api.github.com/repos/atom/vim-mode/pulls/555"}}},"pull_request":{"url":"https://api.github.com/repos/atom/vim-mode/pulls/555","id":30728076,"html_url":"https://github.com/atom/vim-mode/pull/555","diff_url":"https://github.com/atom/vim-mode/pull/555.diff","patch_url":"https://github.com/atom/vim-mode/pull/555.patch","issue_url":"https://api.github.com/repos/atom/vim-mode/issues/555","number":555,"state":"open","locked":false,"title":"fix wrapping behavior of x","user":{"login":"jacekkopecky","id":807315,"avatar_url":"https://avatars.githubusercontent.com/u/807315?v=3","gravatar_id":"","url":"https://api.github.com/users/jacekkopecky","html_url":"https://github.com/jacekkopecky","followers_url":"https://api.github.com/users/jacekkopecky/followers","following_url":"https://api.github.com/users/jacekkopecky/following{/other_user}","gists_url":"https://api.github.com/users/jacekkopecky/gists{/gist_id}","starred_url":"https://api.github.com/users/jacekkopecky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacekkopecky/subscriptions","organizations_url":"https://api.github.com/users/jacekkopecky/orgs","repos_url":"https://api.github.com/users/jacekkopecky/repos","events_url":"https://api.github.com/users/jacekkopecky/events{/privacy}","received_events_url":"https://api.github.com/users/jacekkopecky/received_events","type":"User","site_admin":false},"body":"`x` should only wrap to next line with `vim-mode.wrapLeftRightMotion = true`, and only with a count or on an empty line.\r\nThe PR also adds a bit to the tests for X.","created_at":"2015-03-08T22:30:45Z","updated_at":"2015-03-25T21:58:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"66c3d2214c65344a4505aea10fe99bf5bfd9d5bd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/atom/vim-mode/pulls/555/commits","review_comments_url":"https://api.github.com/repos/atom/vim-mode/pulls/555/comments","review_comment_url":"https://api.github.com/repos/atom/vim-mode/pulls/comments{/number}","comments_url":"https://api.github.com/repos/atom/vim-mode/issues/555/comments","statuses_url":"https://api.github.com/repos/atom/vim-mode/statuses/43f85dbf7e4904f13c208d5539bb9bca6e427613","head":{"label":"jacekkopecky:fix-wrapping-of-x","ref":"fix-wrapping-of-x","sha":"43f85dbf7e4904f13c208d5539bb9bca6e427613","user":{"login":"jacekkopecky","id":807315,"avatar_url":"https://avatars.githubusercontent.com/u/807315?v=3","gravatar_id":"","url":"https://api.github.com/users/jacekkopecky","html_url":"https://github.com/jacekkopecky","followers_url":"https://api.github.com/users/jacekkopecky/followers","following_url":"https://api.github.com/users/jacekkopecky/following{/other_user}","gists_url":"https://api.github.com/users/jacekkopecky/gists{/gist_id}","starred_url":"https://api.github.com/users/jacekkopecky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacekkopecky/subscriptions","organizations_url":"https://api.github.com/users/jacekkopecky/orgs","repos_url":"https://api.github.com/users/jacekkopecky/repos","events_url":"https://api.github.com/users/jacekkopecky/events{/privacy}","received_events_url":"https://api.github.com/users/jacekkopecky/received_events","type":"User","site_admin":false},"repo":{"id":30833935,"name":"vim-mode","full_name":"jacekkopecky/vim-mode","owner":{"login":"jacekkopecky","id":807315,"avatar_url":"https://avatars.githubusercontent.com/u/807315?v=3","gravatar_id":"","url":"https://api.github.com/users/jacekkopecky","html_url":"https://github.com/jacekkopecky","followers_url":"https://api.github.com/users/jacekkopecky/followers","following_url":"https://api.github.com/users/jacekkopecky/following{/other_user}","gists_url":"https://api.github.com/users/jacekkopecky/gists{/gist_id}","starred_url":"https://api.github.com/users/jacekkopecky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacekkopecky/subscriptions","organizations_url":"https://api.github.com/users/jacekkopecky/orgs","repos_url":"https://api.github.com/users/jacekkopecky/repos","events_url":"https://api.github.com/users/jacekkopecky/events{/privacy}","received_events_url":"https://api.github.com/users/jacekkopecky/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jacekkopecky/vim-mode","description":"Next generation vim support for atom","fork":true,"url":"https://api.github.com/repos/jacekkopecky/vim-mode","forks_url":"https://api.github.com/repos/jacekkopecky/vim-mode/forks","keys_url":"https://api.github.com/repos/jacekkopecky/vim-mode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jacekkopecky/vim-mode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jacekkopecky/vim-mode/teams","hooks_url":"https://api.github.com/repos/jacekkopecky/vim-mode/hooks","issue_events_url":"https://api.github.com/repos/jacekkopecky/vim-mode/issues/events{/number}","events_url":"https://api.github.com/repos/jacekkopecky/vim-mode/events","assignees_url":"https://api.github.com/repos/jacekkopecky/vim-mode/assignees{/user}","branches_url":"https://api.github.com/repos/jacekkopecky/vim-mode/branches{/branch}","tags_url":"https://api.github.com/repos/jacekkopecky/vim-mode/tags","blobs_url":"https://api.github.com/repos/jacekkopecky/vim-mode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jacekkopecky/vim-mode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jacekkopecky/vim-mode/git/refs{/sha}","trees_url":"https://api.github.com/repos/jacekkopecky/vim-mode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jacekkopecky/vim-mode/statuses/{sha}","languages_url":"https://api.github.com/repos/jacekkopecky/vim-mode/languages","stargazers_url":"https://api.github.com/repos/jacekkopecky/vim-mode/stargazers","contributors_url":"https://api.github.com/repos/jacekkopecky/vim-mode/contributors","subscribers_url":"https://api.github.com/repos/jacekkopecky/vim-mode/subscribers","subscription_url":"https://api.github.com/repos/jacekkopecky/vim-mode/subscription","commits_url":"https://api.github.com/repos/jacekkopecky/vim-mode/commits{/sha}","git_commits_url":"https://api.github.com/repos/jacekkopecky/vim-mode/git/commits{/sha}","comments_url":"https://api.github.com/repos/jacekkopecky/vim-mode/comments{/number}","issue_comment_url":"https://api.github.com/repos/jacekkopecky/vim-mode/issues/comments{/number}","contents_url":"https://api.github.com/repos/jacekkopecky/vim-mode/contents/{+path}","compare_url":"https://api.github.com/repos/jacekkopecky/vim-mode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jacekkopecky/vim-mode/merges","archive_url":"https://api.github.com/repos/jacekkopecky/vim-mode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jacekkopecky/vim-mode/downloads","issues_url":"https://api.github.com/repos/jacekkopecky/vim-mode/issues{/number}","pulls_url":"https://api.github.com/repos/jacekkopecky/vim-mode/pulls{/number}","milestones_url":"https://api.github.com/repos/jacekkopecky/vim-mode/milestones{/number}","notifications_url":"https://api.github.com/repos/jacekkopecky/vim-mode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jacekkopecky/vim-mode/labels{/name}","releases_url":"https://api.github.com/repos/jacekkopecky/vim-mode/releases{/id}","created_at":"2015-02-15T16:53:14Z","updated_at":"2015-03-13T15:38:11Z","pushed_at":"2015-03-25T21:58:10Z","git_url":"git://github.com/jacekkopecky/vim-mode.git","ssh_url":"git@github.com:jacekkopecky/vim-mode.git","clone_url":"https://github.com/jacekkopecky/vim-mode.git","svn_url":"https://github.com/jacekkopecky/vim-mode","homepage":null,"size":1325,"stargazers_count":0,"watchers_count":0,"language":"CoffeeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"atom:master","ref":"master","sha":"991a16c1066aac99b060d7af7762cc9613377c3f","user":{"login":"atom","id":1089146,"avatar_url":"https://avatars.githubusercontent.com/u/1089146?v=3","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"repo":{"id":11827104,"name":"vim-mode","full_name":"atom/vim-mode","owner":{"login":"atom","id":1089146,"avatar_url":"https://avatars.githubusercontent.com/u/1089146?v=3","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/atom/vim-mode","description":"Next generation vim support for atom","fork":false,"url":"https://api.github.com/repos/atom/vim-mode","forks_url":"https://api.github.com/repos/atom/vim-mode/forks","keys_url":"https://api.github.com/repos/atom/vim-mode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atom/vim-mode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atom/vim-mode/teams","hooks_url":"https://api.github.com/repos/atom/vim-mode/hooks","issue_events_url":"https://api.github.com/repos/atom/vim-mode/issues/events{/number}","events_url":"https://api.github.com/repos/atom/vim-mode/events","assignees_url":"https://api.github.com/repos/atom/vim-mode/assignees{/user}","branches_url":"https://api.github.com/repos/atom/vim-mode/branches{/branch}","tags_url":"https://api.github.com/repos/atom/vim-mode/tags","blobs_url":"https://api.github.com/repos/atom/vim-mode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atom/vim-mode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atom/vim-mode/git/refs{/sha}","trees_url":"https://api.github.com/repos/atom/vim-mode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atom/vim-mode/statuses/{sha}","languages_url":"https://api.github.com/repos/atom/vim-mode/languages","stargazers_url":"https://api.github.com/repos/atom/vim-mode/stargazers","contributors_url":"https://api.github.com/repos/atom/vim-mode/contributors","subscribers_url":"https://api.github.com/repos/atom/vim-mode/subscribers","subscription_url":"https://api.github.com/repos/atom/vim-mode/subscription","commits_url":"https://api.github.com/repos/atom/vim-mode/commits{/sha}","git_commits_url":"https://api.github.com/repos/atom/vim-mode/git/commits{/sha}","comments_url":"https://api.github.com/repos/atom/vim-mode/comments{/number}","issue_comment_url":"https://api.github.com/repos/atom/vim-mode/issues/comments{/number}","contents_url":"https://api.github.com/repos/atom/vim-mode/contents/{+path}","compare_url":"https://api.github.com/repos/atom/vim-mode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atom/vim-mode/merges","archive_url":"https://api.github.com/repos/atom/vim-mode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atom/vim-mode/downloads","issues_url":"https://api.github.com/repos/atom/vim-mode/issues{/number}","pulls_url":"https://api.github.com/repos/atom/vim-mode/pulls{/number}","milestones_url":"https://api.github.com/repos/atom/vim-mode/milestones{/number}","notifications_url":"https://api.github.com/repos/atom/vim-mode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atom/vim-mode/labels{/name}","releases_url":"https://api.github.com/repos/atom/vim-mode/releases{/id}","created_at":"2013-08-01T20:37:14Z","updated_at":"2015-03-25T15:25:24Z","pushed_at":"2015-03-25T21:58:10Z","git_url":"git://github.com/atom/vim-mode.git","ssh_url":"git@github.com:atom/vim-mode.git","clone_url":"https://github.com/atom/vim-mode.git","svn_url":"https://github.com/atom/vim-mode","homepage":null,"size":4605,"stargazers_count":870,"watchers_count":870,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":187,"mirror_url":null,"open_issues_count":132,"forks":187,"open_issues":132,"watchers":870,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/atom/vim-mode/pulls/555"},"html":{"href":"https://github.com/atom/vim-mode/pull/555"},"issue":{"href":"https://api.github.com/repos/atom/vim-mode/issues/555"},"comments":{"href":"https://api.github.com/repos/atom/vim-mode/issues/555/comments"},"review_comments":{"href":"https://api.github.com/repos/atom/vim-mode/pulls/555/comments"},"review_comment":{"href":"https://api.github.com/repos/atom/vim-mode/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/atom/vim-mode/pulls/555/commits"},"statuses":{"href":"https://api.github.com/repos/atom/vim-mode/statuses/43f85dbf7e4904f13c208d5539bb9bca6e427613"}}}}