{"action":"created","comment":{"url":"https://api.github.com/repos/livecode/livecode/pulls/comments/135462124","pull_request_review_id":58875103,"id":135462124,"diff_hunk":"@@ -477,7 +477,7 @@ void MCField::setparagraphs(MCParagraph *newpgptr, uint4 parid, findex_t p_start\n         else\n             t_lastpgptr = newpgptr -> prev();\n \n-        t_insert_paragraph->setselectionindex(p_start, p_start, False, False);\n+        t_insert_paragraph->setselectionindex(PARAGRAPH_MAX_LEN, PARAGRAPH_MAX_LEN, False, False);","path":"engine/src/fields.cpp","position":5,"original_position":5,"commit_id":"3216c13d17bf37f5a50216dc2cdd5fe32d68cb58","original_commit_id":"3216c13d17bf37f5a50216dc2cdd5fe32d68cb58","user":{"login":"runrevmark","id":3985298,"avatar_url":"https://avatars0.githubusercontent.com/u/3985298?v=4","gravatar_id":"","url":"https://api.github.com/users/runrevmark","html_url":"https://github.com/runrevmark","followers_url":"https://api.github.com/users/runrevmark/followers","following_url":"https://api.github.com/users/runrevmark/following{/other_user}","gists_url":"https://api.github.com/users/runrevmark/gists{/gist_id}","starred_url":"https://api.github.com/users/runrevmark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/runrevmark/subscriptions","organizations_url":"https://api.github.com/users/runrevmark/orgs","repos_url":"https://api.github.com/users/runrevmark/repos","events_url":"https://api.github.com/users/runrevmark/events{/privacy}","received_events_url":"https://api.github.com/users/runrevmark/received_events","type":"User","site_admin":false},"body":"The indextoparagraph() method converts the input start / end into paragraph relative indicies - relative to the paragraph passed in... So, assuming that it is 'correct' to set the selection index to p_start in the paragraph containing it then the previous code was already correct, and this change is actually incorrect.","created_at":"2017-08-28T07:56:12Z","updated_at":"2017-08-28T07:56:12Z","html_url":"https://github.com/livecode/livecode/pull/5862#discussion_r135462124","pull_request_url":"https://api.github.com/repos/livecode/livecode/pulls/5862","_links":{"self":{"href":"https://api.github.com/repos/livecode/livecode/pulls/comments/135462124"},"html":{"href":"https://github.com/livecode/livecode/pull/5862#discussion_r135462124"},"pull_request":{"href":"https://api.github.com/repos/livecode/livecode/pulls/5862"}}},"pull_request":{"url":"https://api.github.com/repos/livecode/livecode/pulls/5862","id":137821383,"html_url":"https://github.com/livecode/livecode/pull/5862","diff_url":"https://github.com/livecode/livecode/pull/5862.diff","patch_url":"https://github.com/livecode/livecode/pull/5862.patch","issue_url":"https://api.github.com/repos/livecode/livecode/issues/5862","number":5862,"state":"open","locked":false,"title":"[[ Bug 20240 ]] Fix text selection not contiguous","user":{"login":"montegoulding","id":351144,"avatar_url":"https://avatars3.githubusercontent.com/u/351144?v=4","gravatar_id":"","url":"https://api.github.com/users/montegoulding","html_url":"https://github.com/montegoulding","followers_url":"https://api.github.com/users/montegoulding/followers","following_url":"https://api.github.com/users/montegoulding/following{/other_user}","gists_url":"https://api.github.com/users/montegoulding/gists{/gist_id}","starred_url":"https://api.github.com/users/montegoulding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/montegoulding/subscriptions","organizations_url":"https://api.github.com/users/montegoulding/orgs","repos_url":"https://api.github.com/users/montegoulding/repos","events_url":"https://api.github.com/users/montegoulding/events{/privacy}","received_events_url":"https://api.github.com/users/montegoulding/received_events","type":"User","site_admin":false},"body":"This patch fixes a bug where `MCField::setparagraphs` was calling\r\n`MCParagraph::setselectionindex` to clear the current selection with\r\nfield indexes rather than paragraph indexes. Additionally to clear\r\nthe selection it should call `setselectionindex` with `PARAGRAPH_MAX_LEN`\r\nas is done elsewhere.\r\n\r\n@runrevmark @livecodeali this patch does appear to resolve my reliable recipe but not Panos's which I believe is both different and less dangerous as it only occurs if you do things one normally wouldn't do.\r\n\r\nPS this is some confusing code! So... I could be *way* off mark with this fix however I'm really not sure why that api would be called with field indexes nor why it wouldn't do the same thing as when clearing the selection elsewhere...","created_at":"2017-08-27T04:57:11Z","updated_at":"2017-08-28T07:56:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2442c25e2b4bb6442be6899ea846f94e70d2472c","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":{"url":"https://api.github.com/repos/livecode/livecode/milestones/149","html_url":"https://github.com/livecode/livecode/milestone/149","labels_url":"https://api.github.com/repos/livecode/livecode/milestones/149/labels","id":2673531,"number":149,"title":"8.2.0-dp-1","description":null,"creator":{"login":"livecodeali","id":3985854,"avatar_url":"https://avatars0.githubusercontent.com/u/3985854?v=4","gravatar_id":"","url":"https://api.github.com/users/livecodeali","html_url":"https://github.com/livecodeali","followers_url":"https://api.github.com/users/livecodeali/followers","following_url":"https://api.github.com/users/livecodeali/following{/other_user}","gists_url":"https://api.github.com/users/livecodeali/gists{/gist_id}","starred_url":"https://api.github.com/users/livecodeali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/livecodeali/subscriptions","organizations_url":"https://api.github.com/users/livecodeali/orgs","repos_url":"https://api.github.com/users/livecodeali/repos","events_url":"https://api.github.com/users/livecodeali/events{/privacy}","received_events_url":"https://api.github.com/users/livecodeali/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":8,"state":"open","created_at":"2017-08-01T10:40:48Z","updated_at":"2017-08-27T04:57:12Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/livecode/livecode/pulls/5862/commits","review_comments_url":"https://api.github.com/repos/livecode/livecode/pulls/5862/comments","review_comment_url":"https://api.github.com/repos/livecode/livecode/pulls/comments{/number}","comments_url":"https://api.github.com/repos/livecode/livecode/issues/5862/comments","statuses_url":"https://api.github.com/repos/livecode/livecode/statuses/3216c13d17bf37f5a50216dc2cdd5fe32d68cb58","head":{"label":"montegoulding:bugfix-20240","ref":"bugfix-20240","sha":"3216c13d17bf37f5a50216dc2cdd5fe32d68cb58","user":{"login":"montegoulding","id":351144,"avatar_url":"https://avatars3.githubusercontent.com/u/351144?v=4","gravatar_id":"","url":"https://api.github.com/users/montegoulding","html_url":"https://github.com/montegoulding","followers_url":"https://api.github.com/users/montegoulding/followers","following_url":"https://api.github.com/users/montegoulding/following{/other_user}","gists_url":"https://api.github.com/users/montegoulding/gists{/gist_id}","starred_url":"https://api.github.com/users/montegoulding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/montegoulding/subscriptions","organizations_url":"https://api.github.com/users/montegoulding/orgs","repos_url":"https://api.github.com/users/montegoulding/repos","events_url":"https://api.github.com/users/montegoulding/events{/privacy}","received_events_url":"https://api.github.com/users/montegoulding/received_events","type":"User","site_admin":false},"repo":{"id":9335660,"name":"livecode","full_name":"montegoulding/livecode","owner":{"login":"montegoulding","id":351144,"avatar_url":"https://avatars3.githubusercontent.com/u/351144?v=4","gravatar_id":"","url":"https://api.github.com/users/montegoulding","html_url":"https://github.com/montegoulding","followers_url":"https://api.github.com/users/montegoulding/followers","following_url":"https://api.github.com/users/montegoulding/following{/other_user}","gists_url":"https://api.github.com/users/montegoulding/gists{/gist_id}","starred_url":"https://api.github.com/users/montegoulding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/montegoulding/subscriptions","organizations_url":"https://api.github.com/users/montegoulding/orgs","repos_url":"https://api.github.com/users/montegoulding/repos","events_url":"https://api.github.com/users/montegoulding/events{/privacy}","received_events_url":"https://api.github.com/users/montegoulding/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/montegoulding/livecode","description":null,"fork":true,"url":"https://api.github.com/repos/montegoulding/livecode","forks_url":"https://api.github.com/repos/montegoulding/livecode/forks","keys_url":"https://api.github.com/repos/montegoulding/livecode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/montegoulding/livecode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/montegoulding/livecode/teams","hooks_url":"https://api.github.com/repos/montegoulding/livecode/hooks","issue_events_url":"https://api.github.com/repos/montegoulding/livecode/issues/events{/number}","events_url":"https://api.github.com/repos/montegoulding/livecode/events","assignees_url":"https://api.github.com/repos/montegoulding/livecode/assignees{/user}","branches_url":"https://api.github.com/repos/montegoulding/livecode/branches{/branch}","tags_url":"https://api.github.com/repos/montegoulding/livecode/tags","blobs_url":"https://api.github.com/repos/montegoulding/livecode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/montegoulding/livecode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/montegoulding/livecode/git/refs{/sha}","trees_url":"https://api.github.com/repos/montegoulding/livecode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/montegoulding/livecode/statuses/{sha}","languages_url":"https://api.github.com/repos/montegoulding/livecode/languages","stargazers_url":"https://api.github.com/repos/montegoulding/livecode/stargazers","contributors_url":"https://api.github.com/repos/montegoulding/livecode/contributors","subscribers_url":"https://api.github.com/repos/montegoulding/livecode/subscribers","subscription_url":"https://api.github.com/repos/montegoulding/livecode/subscription","commits_url":"https://api.github.com/repos/montegoulding/livecode/commits{/sha}","git_commits_url":"https://api.github.com/repos/montegoulding/livecode/git/commits{/sha}","comments_url":"https://api.github.com/repos/montegoulding/livecode/comments{/number}","issue_comment_url":"https://api.github.com/repos/montegoulding/livecode/issues/comments{/number}","contents_url":"https://api.github.com/repos/montegoulding/livecode/contents/{+path}","compare_url":"https://api.github.com/repos/montegoulding/livecode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/montegoulding/livecode/merges","archive_url":"https://api.github.com/repos/montegoulding/livecode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/montegoulding/livecode/downloads","issues_url":"https://api.github.com/repos/montegoulding/livecode/issues{/number}","pulls_url":"https://api.github.com/repos/montegoulding/livecode/pulls{/number}","milestones_url":"https://api.github.com/repos/montegoulding/livecode/milestones{/number}","notifications_url":"https://api.github.com/repos/montegoulding/livecode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/montegoulding/livecode/labels{/name}","releases_url":"https://api.github.com/repos/montegoulding/livecode/releases{/id}","deployments_url":"https://api.github.com/repos/montegoulding/livecode/deployments","created_at":"2013-04-10T01:45:36Z","updated_at":"2014-09-12T04:52:48Z","pushed_at":"2017-08-27T04:50:32Z","git_url":"git://github.com/montegoulding/livecode.git","ssh_url":"git@github.com:montegoulding/livecode.git","clone_url":"https://github.com/montegoulding/livecode.git","svn_url":"https://github.com/montegoulding/livecode","homepage":null,"size":125439,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"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":"livecode:develop-8.2","ref":"develop-8.2","sha":"34f24ebf8ae782b082b5d553fd9cf5b763f4a69d","user":{"login":"livecode","id":3985749,"avatar_url":"https://avatars1.githubusercontent.com/u/3985749?v=4","gravatar_id":"","url":"https://api.github.com/users/livecode","html_url":"https://github.com/livecode","followers_url":"https://api.github.com/users/livecode/followers","following_url":"https://api.github.com/users/livecode/following{/other_user}","gists_url":"https://api.github.com/users/livecode/gists{/gist_id}","starred_url":"https://api.github.com/users/livecode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/livecode/subscriptions","organizations_url":"https://api.github.com/users/livecode/orgs","repos_url":"https://api.github.com/users/livecode/repos","events_url":"https://api.github.com/users/livecode/events{/privacy}","received_events_url":"https://api.github.com/users/livecode/received_events","type":"Organization","site_admin":false},"repo":{"id":9334445,"name":"livecode","full_name":"livecode/livecode","owner":{"login":"livecode","id":3985749,"avatar_url":"https://avatars1.githubusercontent.com/u/3985749?v=4","gravatar_id":"","url":"https://api.github.com/users/livecode","html_url":"https://github.com/livecode","followers_url":"https://api.github.com/users/livecode/followers","following_url":"https://api.github.com/users/livecode/following{/other_user}","gists_url":"https://api.github.com/users/livecode/gists{/gist_id}","starred_url":"https://api.github.com/users/livecode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/livecode/subscriptions","organizations_url":"https://api.github.com/users/livecode/orgs","repos_url":"https://api.github.com/users/livecode/repos","events_url":"https://api.github.com/users/livecode/events{/privacy}","received_events_url":"https://api.github.com/users/livecode/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/livecode/livecode","description":"LiveCode cross-platform development environment (engine)","fork":false,"url":"https://api.github.com/repos/livecode/livecode","forks_url":"https://api.github.com/repos/livecode/livecode/forks","keys_url":"https://api.github.com/repos/livecode/livecode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/livecode/livecode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/livecode/livecode/teams","hooks_url":"https://api.github.com/repos/livecode/livecode/hooks","issue_events_url":"https://api.github.com/repos/livecode/livecode/issues/events{/number}","events_url":"https://api.github.com/repos/livecode/livecode/events","assignees_url":"https://api.github.com/repos/livecode/livecode/assignees{/user}","branches_url":"https://api.github.com/repos/livecode/livecode/branches{/branch}","tags_url":"https://api.github.com/repos/livecode/livecode/tags","blobs_url":"https://api.github.com/repos/livecode/livecode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/livecode/livecode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/livecode/livecode/git/refs{/sha}","trees_url":"https://api.github.com/repos/livecode/livecode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/livecode/livecode/statuses/{sha}","languages_url":"https://api.github.com/repos/livecode/livecode/languages","stargazers_url":"https://api.github.com/repos/livecode/livecode/stargazers","contributors_url":"https://api.github.com/repos/livecode/livecode/contributors","subscribers_url":"https://api.github.com/repos/livecode/livecode/subscribers","subscription_url":"https://api.github.com/repos/livecode/livecode/subscription","commits_url":"https://api.github.com/repos/livecode/livecode/commits{/sha}","git_commits_url":"https://api.github.com/repos/livecode/livecode/git/commits{/sha}","comments_url":"https://api.github.com/repos/livecode/livecode/comments{/number}","issue_comment_url":"https://api.github.com/repos/livecode/livecode/issues/comments{/number}","contents_url":"https://api.github.com/repos/livecode/livecode/contents/{+path}","compare_url":"https://api.github.com/repos/livecode/livecode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/livecode/livecode/merges","archive_url":"https://api.github.com/repos/livecode/livecode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/livecode/livecode/downloads","issues_url":"https://api.github.com/repos/livecode/livecode/issues{/number}","pulls_url":"https://api.github.com/repos/livecode/livecode/pulls{/number}","milestones_url":"https://api.github.com/repos/livecode/livecode/milestones{/number}","notifications_url":"https://api.github.com/repos/livecode/livecode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/livecode/livecode/labels{/name}","releases_url":"https://api.github.com/repos/livecode/livecode/releases{/id}","deployments_url":"https://api.github.com/repos/livecode/livecode/deployments","created_at":"2013-04-10T00:15:57Z","updated_at":"2017-08-27T23:26:52Z","pushed_at":"2017-08-27T07:33:17Z","git_url":"git://github.com/livecode/livecode.git","ssh_url":"git@github.com:livecode/livecode.git","clone_url":"https://github.com/livecode/livecode.git","svn_url":"https://github.com/livecode/livecode","homepage":"https://livecode.com/","size":126106,"stargazers_count":182,"watchers_count":182,"language":"C++","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":127,"mirror_url":null,"open_issues_count":138,"forks":127,"open_issues":138,"watchers":182,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/livecode/livecode/pulls/5862"},"html":{"href":"https://github.com/livecode/livecode/pull/5862"},"issue":{"href":"https://api.github.com/repos/livecode/livecode/issues/5862"},"comments":{"href":"https://api.github.com/repos/livecode/livecode/issues/5862/comments"},"review_comments":{"href":"https://api.github.com/repos/livecode/livecode/pulls/5862/comments"},"review_comment":{"href":"https://api.github.com/repos/livecode/livecode/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/livecode/livecode/pulls/5862/commits"},"statuses":{"href":"https://api.github.com/repos/livecode/livecode/statuses/3216c13d17bf37f5a50216dc2cdd5fe32d68cb58"}}}}
{"actor":{"display_login":"runrevmark"}}