{"action":"created","comment":{"url":"https://api.github.com/repos/lzybkr/PSReadLine/pulls/comments/211441916","pull_request_review_id":147862654,"id":211441916,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMTQ0MTkxNg==","diff_hunk":"@@ -483,16 +483,24 @@ void EnsureMenuAndInputIsVisible(IConsole console, int tooltipLineCount)\n                 }\n             }\n \n-            public void DrawMenu(Menu previousMenu)\n+            public void DrawMenu(Menu previousMenu, bool menuSelect)\n             {\n                 IConsole console = Singleton._console;\n \n                 // Move cursor to the start of the first line after our input.\n                 this.Top = Singleton.ConvertOffsetToPoint(Singleton._buffer.Length).Y + 1;\n-                EnsureMenuAndInputIsVisible(console, tooltipLineCount: 0);\n+                if (menuSelect)\n+                {\n+                    EnsureMenuAndInputIsVisible(console, tooltipLineCount: 0, rows:this.Rows);\n+\n+                    console.CursorVisible = false;\n+                    console.SaveCursor();\n+                }\n+                else\n+                {\n+                    EnsureMenuAndInputIsVisible(console, tooltipLineCount: 0, rows:0);","path":"PSReadLine/Completion.cs","position":37,"original_position":37,"commit_id":"2f57fe5091e0e0cd343b86851dc31c9bdcb2afd5","original_commit_id":"33b2ba6414fddf4fc7ed24b3950a8566c479adc1","user":{"login":"lzybkr","id":2148248,"node_id":"MDQ6VXNlcjIxNDgyNDg=","avatar_url":"https://avatars3.githubusercontent.com/u/2148248?v=4","gravatar_id":"","url":"https://api.github.com/users/lzybkr","html_url":"https://github.com/lzybkr","followers_url":"https://api.github.com/users/lzybkr/followers","following_url":"https://api.github.com/users/lzybkr/following{/other_user}","gists_url":"https://api.github.com/users/lzybkr/gists{/gist_id}","starred_url":"https://api.github.com/users/lzybkr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lzybkr/subscriptions","organizations_url":"https://api.github.com/users/lzybkr/orgs","repos_url":"https://api.github.com/users/lzybkr/repos","events_url":"https://api.github.com/users/lzybkr/events{/privacy}","received_events_url":"https://api.github.com/users/lzybkr/received_events","type":"User","site_admin":false},"body":"Are counting on the `+ 1` to write out a single newline?\r\n\r\nBased on the comment in `EnsureMenuAndInputIsVisible`, I could see that `+ 1` being removed at some point, and then the method would do nothing, right?\r\n\r\nIf my understanding is correct, it would be good to have some way to ensure this problem doesn't come back if someone removes that `+ 1` - a test, or maybe pass `rows:1`.","created_at":"2018-08-20T23:51:05Z","updated_at":"2018-08-20T23:51:05Z","html_url":"https://github.com/lzybkr/PSReadLine/pull/704#discussion_r211441916","pull_request_url":"https://api.github.com/repos/lzybkr/PSReadLine/pulls/704","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/lzybkr/PSReadLine/pulls/comments/211441916"},"html":{"href":"https://github.com/lzybkr/PSReadLine/pull/704#discussion_r211441916"},"pull_request":{"href":"https://api.github.com/repos/lzybkr/PSReadLine/pulls/704"}},"in_reply_to_id":211110636},"pull_request":{"url":"https://api.github.com/repos/lzybkr/PSReadLine/pulls/704","id":193124006,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzMTI0MDA2","html_url":"https://github.com/lzybkr/PSReadLine/pull/704","diff_url":"https://github.com/lzybkr/PSReadLine/pull/704.diff","patch_url":"https://github.com/lzybkr/PSReadLine/pull/704.patch","issue_url":"https://api.github.com/repos/lzybkr/PSReadLine/issues/704","number":704,"state":"open","locked":false,"title":"Fix System.ArgumentOutOfRangeException while get-tab","user":{"login":"jianyunt","id":10171679,"node_id":"MDQ6VXNlcjEwMTcxNjc5","avatar_url":"https://avatars1.githubusercontent.com/u/10171679?v=4","gravatar_id":"","url":"https://api.github.com/users/jianyunt","html_url":"https://github.com/jianyunt","followers_url":"https://api.github.com/users/jianyunt/followers","following_url":"https://api.github.com/users/jianyunt/following{/other_user}","gists_url":"https://api.github.com/users/jianyunt/gists{/gist_id}","starred_url":"https://api.github.com/users/jianyunt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jianyunt/subscriptions","organizations_url":"https://api.github.com/users/jianyunt/orgs","repos_url":"https://api.github.com/users/jianyunt/repos","events_url":"https://api.github.com/users/jianyunt/events{/privacy}","received_events_url":"https://api.github.com/users/jianyunt/received_events","type":"User","site_admin":false},"body":"In the https://github.com/lzybkr/PSReadLine/issues/663, @gshacklett has commented get- and then tab PSReadLine will throw. This case is very often on cloudshell because Azure cmdlets are quite long and people use tab a lot. \r\n\r\nThe fix is to let contents display until complete for the menu not selected case. I tested on Windows, Linux and cloudshell, the fix seems to be working. Please code review. Thanks.\r\n\r\nHowever I broke the PossibleCompletions() tests.  The fix changed the parameter in calling InvokePrompt https://github.com/lzybkr/PSReadLine/blob/master/PSReadLine/Completion.cs#L736 so code path is different. With the fix, we are executing the else block in https://github.com/lzybkr/PSReadLine/blob/master/PSReadLine/ReadLine.cs#L942.","created_at":"2018-06-06T19:59:39Z","updated_at":"2018-08-20T23:51:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cfe043afb9b1335160390293ae0a9580cdad4a48","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/lzybkr/PSReadLine/pulls/704/commits","review_comments_url":"https://api.github.com/repos/lzybkr/PSReadLine/pulls/704/comments","review_comment_url":"https://api.github.com/repos/lzybkr/PSReadLine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lzybkr/PSReadLine/issues/704/comments","statuses_url":"https://api.github.com/repos/lzybkr/PSReadLine/statuses/2f57fe5091e0e0cd343b86851dc31c9bdcb2afd5","head":{"label":"jianyunt:tabissue","ref":"tabissue","sha":"2f57fe5091e0e0cd343b86851dc31c9bdcb2afd5","user":{"login":"jianyunt","id":10171679,"node_id":"MDQ6VXNlcjEwMTcxNjc5","avatar_url":"https://avatars1.githubusercontent.com/u/10171679?v=4","gravatar_id":"","url":"https://api.github.com/users/jianyunt","html_url":"https://github.com/jianyunt","followers_url":"https://api.github.com/users/jianyunt/followers","following_url":"https://api.github.com/users/jianyunt/following{/other_user}","gists_url":"https://api.github.com/users/jianyunt/gists{/gist_id}","starred_url":"https://api.github.com/users/jianyunt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jianyunt/subscriptions","organizations_url":"https://api.github.com/users/jianyunt/orgs","repos_url":"https://api.github.com/users/jianyunt/repos","events_url":"https://api.github.com/users/jianyunt/events{/privacy}","received_events_url":"https://api.github.com/users/jianyunt/received_events","type":"User","site_admin":false},"repo":{"id":136248812,"node_id":"MDEwOlJlcG9zaXRvcnkxMzYyNDg4MTI=","name":"PSReadLine","full_name":"jianyunt/PSReadLine","owner":{"login":"jianyunt","id":10171679,"node_id":"MDQ6VXNlcjEwMTcxNjc5","avatar_url":"https://avatars1.githubusercontent.com/u/10171679?v=4","gravatar_id":"","url":"https://api.github.com/users/jianyunt","html_url":"https://github.com/jianyunt","followers_url":"https://api.github.com/users/jianyunt/followers","following_url":"https://api.github.com/users/jianyunt/following{/other_user}","gists_url":"https://api.github.com/users/jianyunt/gists{/gist_id}","starred_url":"https://api.github.com/users/jianyunt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jianyunt/subscriptions","organizations_url":"https://api.github.com/users/jianyunt/orgs","repos_url":"https://api.github.com/users/jianyunt/repos","events_url":"https://api.github.com/users/jianyunt/events{/privacy}","received_events_url":"https://api.github.com/users/jianyunt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jianyunt/PSReadLine","description":"A bash inspired readline implementation for PowerShell","fork":true,"url":"https://api.github.com/repos/jianyunt/PSReadLine","forks_url":"https://api.github.com/repos/jianyunt/PSReadLine/forks","keys_url":"https://api.github.com/repos/jianyunt/PSReadLine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jianyunt/PSReadLine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jianyunt/PSReadLine/teams","hooks_url":"https://api.github.com/repos/jianyunt/PSReadLine/hooks","issue_events_url":"https://api.github.com/repos/jianyunt/PSReadLine/issues/events{/number}","events_url":"https://api.github.com/repos/jianyunt/PSReadLine/events","assignees_url":"https://api.github.com/repos/jianyunt/PSReadLine/assignees{/user}","branches_url":"https://api.github.com/repos/jianyunt/PSReadLine/branches{/branch}","tags_url":"https://api.github.com/repos/jianyunt/PSReadLine/tags","blobs_url":"https://api.github.com/repos/jianyunt/PSReadLine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jianyunt/PSReadLine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jianyunt/PSReadLine/git/refs{/sha}","trees_url":"https://api.github.com/repos/jianyunt/PSReadLine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jianyunt/PSReadLine/statuses/{sha}","languages_url":"https://api.github.com/repos/jianyunt/PSReadLine/languages","stargazers_url":"https://api.github.com/repos/jianyunt/PSReadLine/stargazers","contributors_url":"https://api.github.com/repos/jianyunt/PSReadLine/contributors","subscribers_url":"https://api.github.com/repos/jianyunt/PSReadLine/subscribers","subscription_url":"https://api.github.com/repos/jianyunt/PSReadLine/subscription","commits_url":"https://api.github.com/repos/jianyunt/PSReadLine/commits{/sha}","git_commits_url":"https://api.github.com/repos/jianyunt/PSReadLine/git/commits{/sha}","comments_url":"https://api.github.com/repos/jianyunt/PSReadLine/comments{/number}","issue_comment_url":"https://api.github.com/repos/jianyunt/PSReadLine/issues/comments{/number}","contents_url":"https://api.github.com/repos/jianyunt/PSReadLine/contents/{+path}","compare_url":"https://api.github.com/repos/jianyunt/PSReadLine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jianyunt/PSReadLine/merges","archive_url":"https://api.github.com/repos/jianyunt/PSReadLine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jianyunt/PSReadLine/downloads","issues_url":"https://api.github.com/repos/jianyunt/PSReadLine/issues{/number}","pulls_url":"https://api.github.com/repos/jianyunt/PSReadLine/pulls{/number}","milestones_url":"https://api.github.com/repos/jianyunt/PSReadLine/milestones{/number}","notifications_url":"https://api.github.com/repos/jianyunt/PSReadLine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jianyunt/PSReadLine/labels{/name}","releases_url":"https://api.github.com/repos/jianyunt/PSReadLine/releases{/id}","deployments_url":"https://api.github.com/repos/jianyunt/PSReadLine/deployments","created_at":"2018-06-06T00:11:20Z","updated_at":"2018-08-16T00:59:37Z","pushed_at":"2018-08-20T17:43:47Z","git_url":"git://github.com/jianyunt/PSReadLine.git","ssh_url":"git@github.com:jianyunt/PSReadLine.git","clone_url":"https://github.com/jianyunt/PSReadLine.git","svn_url":"https://github.com/jianyunt/PSReadLine","homepage":"","size":1890,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"lzybkr:master","ref":"master","sha":"e5d1426f105b1371340ff97f1b7bfabc9f2675bc","user":{"login":"lzybkr","id":2148248,"node_id":"MDQ6VXNlcjIxNDgyNDg=","avatar_url":"https://avatars3.githubusercontent.com/u/2148248?v=4","gravatar_id":"","url":"https://api.github.com/users/lzybkr","html_url":"https://github.com/lzybkr","followers_url":"https://api.github.com/users/lzybkr/followers","following_url":"https://api.github.com/users/lzybkr/following{/other_user}","gists_url":"https://api.github.com/users/lzybkr/gists{/gist_id}","starred_url":"https://api.github.com/users/lzybkr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lzybkr/subscriptions","organizations_url":"https://api.github.com/users/lzybkr/orgs","repos_url":"https://api.github.com/users/lzybkr/repos","events_url":"https://api.github.com/users/lzybkr/events{/privacy}","received_events_url":"https://api.github.com/users/lzybkr/received_events","type":"User","site_admin":false},"repo":{"id":10025737,"node_id":"MDEwOlJlcG9zaXRvcnkxMDAyNTczNw==","name":"PSReadLine","full_name":"lzybkr/PSReadLine","owner":{"login":"lzybkr","id":2148248,"node_id":"MDQ6VXNlcjIxNDgyNDg=","avatar_url":"https://avatars3.githubusercontent.com/u/2148248?v=4","gravatar_id":"","url":"https://api.github.com/users/lzybkr","html_url":"https://github.com/lzybkr","followers_url":"https://api.github.com/users/lzybkr/followers","following_url":"https://api.github.com/users/lzybkr/following{/other_user}","gists_url":"https://api.github.com/users/lzybkr/gists{/gist_id}","starred_url":"https://api.github.com/users/lzybkr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lzybkr/subscriptions","organizations_url":"https://api.github.com/users/lzybkr/orgs","repos_url":"https://api.github.com/users/lzybkr/repos","events_url":"https://api.github.com/users/lzybkr/events{/privacy}","received_events_url":"https://api.github.com/users/lzybkr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lzybkr/PSReadLine","description":"A bash inspired readline implementation for PowerShell","fork":false,"url":"https://api.github.com/repos/lzybkr/PSReadLine","forks_url":"https://api.github.com/repos/lzybkr/PSReadLine/forks","keys_url":"https://api.github.com/repos/lzybkr/PSReadLine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lzybkr/PSReadLine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lzybkr/PSReadLine/teams","hooks_url":"https://api.github.com/repos/lzybkr/PSReadLine/hooks","issue_events_url":"https://api.github.com/repos/lzybkr/PSReadLine/issues/events{/number}","events_url":"https://api.github.com/repos/lzybkr/PSReadLine/events","assignees_url":"https://api.github.com/repos/lzybkr/PSReadLine/assignees{/user}","branches_url":"https://api.github.com/repos/lzybkr/PSReadLine/branches{/branch}","tags_url":"https://api.github.com/repos/lzybkr/PSReadLine/tags","blobs_url":"https://api.github.com/repos/lzybkr/PSReadLine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lzybkr/PSReadLine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lzybkr/PSReadLine/git/refs{/sha}","trees_url":"https://api.github.com/repos/lzybkr/PSReadLine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lzybkr/PSReadLine/statuses/{sha}","languages_url":"https://api.github.com/repos/lzybkr/PSReadLine/languages","stargazers_url":"https://api.github.com/repos/lzybkr/PSReadLine/stargazers","contributors_url":"https://api.github.com/repos/lzybkr/PSReadLine/contributors","subscribers_url":"https://api.github.com/repos/lzybkr/PSReadLine/subscribers","subscription_url":"https://api.github.com/repos/lzybkr/PSReadLine/subscription","commits_url":"https://api.github.com/repos/lzybkr/PSReadLine/commits{/sha}","git_commits_url":"https://api.github.com/repos/lzybkr/PSReadLine/git/commits{/sha}","comments_url":"https://api.github.com/repos/lzybkr/PSReadLine/comments{/number}","issue_comment_url":"https://api.github.com/repos/lzybkr/PSReadLine/issues/comments{/number}","contents_url":"https://api.github.com/repos/lzybkr/PSReadLine/contents/{+path}","compare_url":"https://api.github.com/repos/lzybkr/PSReadLine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lzybkr/PSReadLine/merges","archive_url":"https://api.github.com/repos/lzybkr/PSReadLine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lzybkr/PSReadLine/downloads","issues_url":"https://api.github.com/repos/lzybkr/PSReadLine/issues{/number}","pulls_url":"https://api.github.com/repos/lzybkr/PSReadLine/pulls{/number}","milestones_url":"https://api.github.com/repos/lzybkr/PSReadLine/milestones{/number}","notifications_url":"https://api.github.com/repos/lzybkr/PSReadLine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lzybkr/PSReadLine/labels{/name}","releases_url":"https://api.github.com/repos/lzybkr/PSReadLine/releases{/id}","deployments_url":"https://api.github.com/repos/lzybkr/PSReadLine/deployments","created_at":"2013-05-13T06:39:28Z","updated_at":"2018-08-19T07:12:17Z","pushed_at":"2018-08-20T17:43:48Z","git_url":"git://github.com/lzybkr/PSReadLine.git","ssh_url":"git@github.com:lzybkr/PSReadLine.git","clone_url":"https://github.com/lzybkr/PSReadLine.git","svn_url":"https://github.com/lzybkr/PSReadLine","homepage":"","size":1868,"stargazers_count":1076,"watchers_count":1076,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":115,"mirror_url":null,"archived":false,"open_issues_count":107,"license":null,"forks":115,"open_issues":107,"watchers":1076,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lzybkr/PSReadLine/pulls/704"},"html":{"href":"https://github.com/lzybkr/PSReadLine/pull/704"},"issue":{"href":"https://api.github.com/repos/lzybkr/PSReadLine/issues/704"},"comments":{"href":"https://api.github.com/repos/lzybkr/PSReadLine/issues/704/comments"},"review_comments":{"href":"https://api.github.com/repos/lzybkr/PSReadLine/pulls/704/comments"},"review_comment":{"href":"https://api.github.com/repos/lzybkr/PSReadLine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lzybkr/PSReadLine/pulls/704/commits"},"statuses":{"href":"https://api.github.com/repos/lzybkr/PSReadLine/statuses/2f57fe5091e0e0cd343b86851dc31c9bdcb2afd5"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"lzybkr"}}