{"action":"created","comment":{"url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/pulls/comments/71086144","id":71086144,"diff_hunk":"@@ -111,12 +114,9 @@ type SnapshotSpan with\n     member inline x.EndLineNum  = x.Snapshot.GetLineNumberFromPosition x.End.Position\n     member inline x.EndColumn = x.End.Position - x.EndLine.Start.Position\n \n-    member x.ModStart (num) = SnapshotSpan(SnapshotPoint (x.Snapshot, x.Start.Position + num), x.End)\n-    member x.ModEnd (num) = SnapshotSpan(x.Start, (SnapshotPoint (x.Snapshot,x.End.Position + num)))\n-\n-    member x.ModBoth m1 m2 =\n-        SnapshotSpan(SnapshotPoint (x.Snapshot, x.Start.Position + m1),\n-                     SnapshotPoint (x.Snapshot, x.End.Position + m2))\n+    member x.ModStart num = VS.Snapshot.mkSpan (x.Start + num) x.End ","path":"src/FSharp.Editing.VisualStudio/Common/Utils.fs","position":35,"original_position":35,"commit_id":"1e10a96218f6a2c2ddfdc0b4e33df29ac6a15704","original_commit_id":"1e10a96218f6a2c2ddfdc0b4e33df29ac6a15704","user":{"login":"smoothdeveloper","id":87944,"avatar_url":"https://avatars.githubusercontent.com/u/87944?v=3","gravatar_id":"","url":"https://api.github.com/users/smoothdeveloper","html_url":"https://github.com/smoothdeveloper","followers_url":"https://api.github.com/users/smoothdeveloper/followers","following_url":"https://api.github.com/users/smoothdeveloper/following{/other_user}","gists_url":"https://api.github.com/users/smoothdeveloper/gists{/gist_id}","starred_url":"https://api.github.com/users/smoothdeveloper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smoothdeveloper/subscriptions","organizations_url":"https://api.github.com/users/smoothdeveloper/orgs","repos_url":"https://api.github.com/users/smoothdeveloper/repos","events_url":"https://api.github.com/users/smoothdeveloper/events{/privacy}","received_events_url":"https://api.github.com/users/smoothdeveloper/received_events","type":"User","site_admin":false},"body":"What about other calls? I even think the later one in your example is more readable and more F# idiomatic.\r\n\r\nIf you want to use parens: \r\n\r\n`SnapshotSpan(x.Start + m1, x.End + m2)` already does that so I don't see use in the module doing the same.\r\n","created_at":"2016-07-17T17:41:30Z","updated_at":"2016-07-17T17:41:30Z","html_url":"https://github.com/fsprojects/VisualFSharpPowerTools/pull/1438#discussion_r71086144","pull_request_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/pulls/1438","_links":{"self":{"href":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/pulls/comments/71086144"},"html":{"href":"https://github.com/fsprojects/VisualFSharpPowerTools/pull/1438#discussion_r71086144"},"pull_request":{"href":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/pulls/1438"}}},"pull_request":{"url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/pulls/1438","id":77717155,"html_url":"https://github.com/fsprojects/VisualFSharpPowerTools/pull/1438","diff_url":"https://github.com/fsprojects/VisualFSharpPowerTools/pull/1438.diff","patch_url":"https://github.com/fsprojects/VisualFSharpPowerTools/pull/1438.patch","issue_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/issues/1438","number":1438,"state":"open","locked":false,"title":"Small cleaning of usage of SnapshotSpan/SnapshotPoint","user":{"login":"smoothdeveloper","id":87944,"avatar_url":"https://avatars.githubusercontent.com/u/87944?v=3","gravatar_id":"","url":"https://api.github.com/users/smoothdeveloper","html_url":"https://github.com/smoothdeveloper","followers_url":"https://api.github.com/users/smoothdeveloper/followers","following_url":"https://api.github.com/users/smoothdeveloper/following{/other_user}","gists_url":"https://api.github.com/users/smoothdeveloper/gists{/gist_id}","starred_url":"https://api.github.com/users/smoothdeveloper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smoothdeveloper/subscriptions","organizations_url":"https://api.github.com/users/smoothdeveloper/orgs","repos_url":"https://api.github.com/users/smoothdeveloper/repos","events_url":"https://api.github.com/users/smoothdeveloper/events{/privacy}","received_events_url":"https://api.github.com/users/smoothdeveloper/received_events","type":"User","site_admin":false},"body":"see #1426\r\n* refactor low hanging fruits related to usage of SnapshotPoint\r\n* introduce VS.Snapshot module with helper functions to build SnapshotPoint and SnapshotSpan","created_at":"2016-07-16T19:11:19Z","updated_at":"2016-07-17T17:41:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"203a714956b3ff0638e40d99eedcd45bddf7053e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/pulls/1438/commits","review_comments_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/pulls/1438/comments","review_comment_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/issues/1438/comments","statuses_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/statuses/1e10a96218f6a2c2ddfdc0b4e33df29ac6a15704","head":{"label":"smoothdeveloper:low-hanging-fruit-vsapi-snapshotpoint","ref":"low-hanging-fruit-vsapi-snapshotpoint","sha":"1e10a96218f6a2c2ddfdc0b4e33df29ac6a15704","user":{"login":"smoothdeveloper","id":87944,"avatar_url":"https://avatars.githubusercontent.com/u/87944?v=3","gravatar_id":"","url":"https://api.github.com/users/smoothdeveloper","html_url":"https://github.com/smoothdeveloper","followers_url":"https://api.github.com/users/smoothdeveloper/followers","following_url":"https://api.github.com/users/smoothdeveloper/following{/other_user}","gists_url":"https://api.github.com/users/smoothdeveloper/gists{/gist_id}","starred_url":"https://api.github.com/users/smoothdeveloper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smoothdeveloper/subscriptions","organizations_url":"https://api.github.com/users/smoothdeveloper/orgs","repos_url":"https://api.github.com/users/smoothdeveloper/repos","events_url":"https://api.github.com/users/smoothdeveloper/events{/privacy}","received_events_url":"https://api.github.com/users/smoothdeveloper/received_events","type":"User","site_admin":false},"repo":{"id":42415318,"name":"VisualFSharpPowerTools","full_name":"smoothdeveloper/VisualFSharpPowerTools","owner":{"login":"smoothdeveloper","id":87944,"avatar_url":"https://avatars.githubusercontent.com/u/87944?v=3","gravatar_id":"","url":"https://api.github.com/users/smoothdeveloper","html_url":"https://github.com/smoothdeveloper","followers_url":"https://api.github.com/users/smoothdeveloper/followers","following_url":"https://api.github.com/users/smoothdeveloper/following{/other_user}","gists_url":"https://api.github.com/users/smoothdeveloper/gists{/gist_id}","starred_url":"https://api.github.com/users/smoothdeveloper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smoothdeveloper/subscriptions","organizations_url":"https://api.github.com/users/smoothdeveloper/orgs","repos_url":"https://api.github.com/users/smoothdeveloper/repos","events_url":"https://api.github.com/users/smoothdeveloper/events{/privacy}","received_events_url":"https://api.github.com/users/smoothdeveloper/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/smoothdeveloper/VisualFSharpPowerTools","description":"Power commands for F# in Visual Studio","fork":true,"url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools","forks_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/forks","keys_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/teams","hooks_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/hooks","issue_events_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/issues/events{/number}","events_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/events","assignees_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/assignees{/user}","branches_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/branches{/branch}","tags_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/tags","blobs_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/git/refs{/sha}","trees_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/statuses/{sha}","languages_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/languages","stargazers_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/stargazers","contributors_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/contributors","subscribers_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/subscribers","subscription_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/subscription","commits_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/commits{/sha}","git_commits_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/git/commits{/sha}","comments_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/comments{/number}","issue_comment_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/issues/comments{/number}","contents_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/contents/{+path}","compare_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/merges","archive_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/downloads","issues_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/issues{/number}","pulls_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/pulls{/number}","milestones_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/milestones{/number}","notifications_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/labels{/name}","releases_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/releases{/id}","deployments_url":"https://api.github.com/repos/smoothdeveloper/VisualFSharpPowerTools/deployments","created_at":"2015-09-13T22:26:47Z","updated_at":"2016-04-24T16:21:44Z","pushed_at":"2016-07-17T13:57:07Z","git_url":"git://github.com/smoothdeveloper/VisualFSharpPowerTools.git","ssh_url":"git@github.com:smoothdeveloper/VisualFSharpPowerTools.git","clone_url":"https://github.com/smoothdeveloper/VisualFSharpPowerTools.git","svn_url":"https://github.com/smoothdeveloper/VisualFSharpPowerTools","homepage":"http://fsprojects.github.io/VisualFSharpPowerTools/","size":25440,"stargazers_count":0,"watchers_count":0,"language":"F#","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"fsprojects:master","ref":"master","sha":"d353dd8189669203b3aeaf45a94c3da65518df18","user":{"login":"fsprojects","id":6001315,"avatar_url":"https://avatars.githubusercontent.com/u/6001315?v=3","gravatar_id":"","url":"https://api.github.com/users/fsprojects","html_url":"https://github.com/fsprojects","followers_url":"https://api.github.com/users/fsprojects/followers","following_url":"https://api.github.com/users/fsprojects/following{/other_user}","gists_url":"https://api.github.com/users/fsprojects/gists{/gist_id}","starred_url":"https://api.github.com/users/fsprojects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsprojects/subscriptions","organizations_url":"https://api.github.com/users/fsprojects/orgs","repos_url":"https://api.github.com/users/fsprojects/repos","events_url":"https://api.github.com/users/fsprojects/events{/privacy}","received_events_url":"https://api.github.com/users/fsprojects/received_events","type":"Organization","site_admin":false},"repo":{"id":16312934,"name":"VisualFSharpPowerTools","full_name":"fsprojects/VisualFSharpPowerTools","owner":{"login":"fsprojects","id":6001315,"avatar_url":"https://avatars.githubusercontent.com/u/6001315?v=3","gravatar_id":"","url":"https://api.github.com/users/fsprojects","html_url":"https://github.com/fsprojects","followers_url":"https://api.github.com/users/fsprojects/followers","following_url":"https://api.github.com/users/fsprojects/following{/other_user}","gists_url":"https://api.github.com/users/fsprojects/gists{/gist_id}","starred_url":"https://api.github.com/users/fsprojects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsprojects/subscriptions","organizations_url":"https://api.github.com/users/fsprojects/orgs","repos_url":"https://api.github.com/users/fsprojects/repos","events_url":"https://api.github.com/users/fsprojects/events{/privacy}","received_events_url":"https://api.github.com/users/fsprojects/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fsprojects/VisualFSharpPowerTools","description":"Power commands for F# in Visual Studio","fork":false,"url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools","forks_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/forks","keys_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/teams","hooks_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/hooks","issue_events_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/issues/events{/number}","events_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/events","assignees_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/assignees{/user}","branches_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/branches{/branch}","tags_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/tags","blobs_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/git/refs{/sha}","trees_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/statuses/{sha}","languages_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/languages","stargazers_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/stargazers","contributors_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/contributors","subscribers_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/subscribers","subscription_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/subscription","commits_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/commits{/sha}","git_commits_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/git/commits{/sha}","comments_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/comments{/number}","issue_comment_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/issues/comments{/number}","contents_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/contents/{+path}","compare_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/merges","archive_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/downloads","issues_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/issues{/number}","pulls_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/pulls{/number}","milestones_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/milestones{/number}","notifications_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/labels{/name}","releases_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/releases{/id}","deployments_url":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/deployments","created_at":"2014-01-28T13:45:30Z","updated_at":"2016-07-17T17:13:12Z","pushed_at":"2016-07-17T16:05:43Z","git_url":"git://github.com/fsprojects/VisualFSharpPowerTools.git","ssh_url":"git@github.com:fsprojects/VisualFSharpPowerTools.git","clone_url":"https://github.com/fsprojects/VisualFSharpPowerTools.git","svn_url":"https://github.com/fsprojects/VisualFSharpPowerTools","homepage":"http://fsprojects.github.io/VisualFSharpPowerTools/","size":30646,"stargazers_count":263,"watchers_count":263,"language":"F#","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":83,"mirror_url":null,"open_issues_count":71,"forks":83,"open_issues":71,"watchers":263,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/pulls/1438"},"html":{"href":"https://github.com/fsprojects/VisualFSharpPowerTools/pull/1438"},"issue":{"href":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/issues/1438"},"comments":{"href":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/issues/1438/comments"},"review_comments":{"href":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/pulls/1438/comments"},"review_comment":{"href":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/pulls/1438/commits"},"statuses":{"href":"https://api.github.com/repos/fsprojects/VisualFSharpPowerTools/statuses/1e10a96218f6a2c2ddfdc0b4e33df29ac6a15704"}}}}
{"actor":{"display_login":"smoothdeveloper"}}