{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/vscode/issues/61327","repository_url":"https://api.github.com/repos/Microsoft/vscode","labels_url":"https://api.github.com/repos/Microsoft/vscode/issues/61327/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vscode/issues/61327/comments","events_url":"https://api.github.com/repos/Microsoft/vscode/issues/61327/events","html_url":"https://github.com/Microsoft/vscode/issues/61327","id":371989347,"node_id":"MDU6SXNzdWUzNzE5ODkzNDc=","number":61327,"title":"IntelliSense tab completion piles closing parentheses","user":{"login":"AndreyKorepanov","id":43748195,"node_id":"MDQ6VXNlcjQzNzQ4MTk1","avatar_url":"https://avatars2.githubusercontent.com/u/43748195?v=4","gravatar_id":"","url":"https://api.github.com/users/AndreyKorepanov","html_url":"https://github.com/AndreyKorepanov","followers_url":"https://api.github.com/users/AndreyKorepanov/followers","following_url":"https://api.github.com/users/AndreyKorepanov/following{/other_user}","gists_url":"https://api.github.com/users/AndreyKorepanov/gists{/gist_id}","starred_url":"https://api.github.com/users/AndreyKorepanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndreyKorepanov/subscriptions","organizations_url":"https://api.github.com/users/AndreyKorepanov/orgs","repos_url":"https://api.github.com/users/AndreyKorepanov/repos","events_url":"https://api.github.com/users/AndreyKorepanov/events{/privacy}","received_events_url":"https://api.github.com/users/AndreyKorepanov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"jrieken","id":1794099,"node_id":"MDQ6VXNlcjE3OTQwOTk=","avatar_url":"https://avatars2.githubusercontent.com/u/1794099?v=4","gravatar_id":"","url":"https://api.github.com/users/jrieken","html_url":"https://github.com/jrieken","followers_url":"https://api.github.com/users/jrieken/followers","following_url":"https://api.github.com/users/jrieken/following{/other_user}","gists_url":"https://api.github.com/users/jrieken/gists{/gist_id}","starred_url":"https://api.github.com/users/jrieken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrieken/subscriptions","organizations_url":"https://api.github.com/users/jrieken/orgs","repos_url":"https://api.github.com/users/jrieken/repos","events_url":"https://api.github.com/users/jrieken/events{/privacy}","received_events_url":"https://api.github.com/users/jrieken/received_events","type":"User","site_admin":false},"assignees":[{"login":"jrieken","id":1794099,"node_id":"MDQ6VXNlcjE3OTQwOTk=","avatar_url":"https://avatars2.githubusercontent.com/u/1794099?v=4","gravatar_id":"","url":"https://api.github.com/users/jrieken","html_url":"https://github.com/jrieken","followers_url":"https://api.github.com/users/jrieken/followers","following_url":"https://api.github.com/users/jrieken/following{/other_user}","gists_url":"https://api.github.com/users/jrieken/gists{/gist_id}","starred_url":"https://api.github.com/users/jrieken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrieken/subscriptions","organizations_url":"https://api.github.com/users/jrieken/orgs","repos_url":"https://api.github.com/users/jrieken/repos","events_url":"https://api.github.com/users/jrieken/events{/privacy}","received_events_url":"https://api.github.com/users/jrieken/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-10-19T14:46:07Z","updated_at":"2018-10-22T11:40:59Z","closed_at":null,"author_association":"NONE","body":"<!-- Please search existing issues to avoid creating duplicates. --> \r\n<!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: https://code.visualstudio.com/insiders/ -->\r\n\r\n<!-- Use Help > Report Issue to prefill these. -->\r\n- VSCode Version:\r\nVersion: 1.28.2 (user setup)\r\nCommit: 7f3ce96ff4729c91352ae6def877e59c561f4850\r\nDate: 2018-10-17T00:23:51.859Z\r\nElectron: 2.0.9\r\nChrome: 61.0.3163.100\r\nNode.js: 8.9.3\r\nV8: 6.1.534.41\r\nArchitecture: x64\r\n\r\nand \r\n\r\nVersion: 1.29.0-insider (user setup)\r\nCommit: 45d5d153bbebed743b77e426615aade34971eb46\r\nDate: 2018-10-19T06:58:45.940Z\r\nElectron: 2.0.11\r\nChrome: 61.0.3163.100\r\nNode.js: 8.9.3\r\nV8: 6.1.534.41\r\nArchitecture: x64\r\n\r\n- OS Version: \r\nWindows 10 Enterprise\r\n\r\nSteps to Reproduce:\r\n\r\n1. Install AL Language extension from marketplace (https://marketplace.visualstudio.com/items?itemName=ms-dynamics-smb.al)\r\n2. Enable tab completion, by setting \"editor.tabCompletion\": \"on\" in the settings json.\r\n3. Unzip attached AL project ALProject12.zip. \r\n4. In the VS Code open AL project: open unzipped folder ALProject12. Ignore \"Symbols are missing\" message.\r\n5. Open HelloWorld.al, go to line 7, put the cursor after int := and press Ctrl+Space to show IntelliSenss competions.\r\n6. Press Tab several times to iterate the list of completions (tab completion).\r\n\r\nResult: multiple closing parenthesis are piled in the end of line, for ex.: int := CaptionClassTranslate())))))\r\nExpected: No extra closing parenthesis are added.\r\n\r\nDiscussion\r\nI've attached the file containing response json, which AL language server sends to VS Code after \"textDocument/completion\" request. You can see that we send functions/methods as snippets (\"insertTextFormat\": 2) with the only tab stop with no placeholder, for example \"Abs($0)\".\r\nSo when user presses Tab, selecting the function/mehtod, Vs Code puts the cursor to the defined position inside the parentheses. Next time user presses Tab button VSCode substitutes everything to the left from cursor position with the new value from completion list, missing the closing parenthesis. \r\n\r\n<!-- Launch with `code --disable-extensions` to check. -->\r\nDoes this issue occur when all extensions are disabled?: No\r\n\r\n[ALProject12.zip](https://github.com/Microsoft/vscode/files/2496216/ALProject12.zip)\r\n[textDocument_completion_response.zip](https://github.com/Microsoft/vscode/files/2496223/textDocument_completion_response.zip)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/vscode/issues/comments/431810511","html_url":"https://github.com/Microsoft/vscode/issues/61327#issuecomment-431810511","issue_url":"https://api.github.com/repos/Microsoft/vscode/issues/61327","id":431810511,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTgxMDUxMQ==","user":{"login":"jrieken","id":1794099,"node_id":"MDQ6VXNlcjE3OTQwOTk=","avatar_url":"https://avatars2.githubusercontent.com/u/1794099?v=4","gravatar_id":"","url":"https://api.github.com/users/jrieken","html_url":"https://github.com/jrieken","followers_url":"https://api.github.com/users/jrieken/followers","following_url":"https://api.github.com/users/jrieken/following{/other_user}","gists_url":"https://api.github.com/users/jrieken/gists{/gist_id}","starred_url":"https://api.github.com/users/jrieken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrieken/subscriptions","organizations_url":"https://api.github.com/users/jrieken/orgs","repos_url":"https://api.github.com/users/jrieken/repos","events_url":"https://api.github.com/users/jrieken/events{/privacy}","received_events_url":"https://api.github.com/users/jrieken/received_events","type":"User","site_admin":false},"created_at":"2018-10-22T11:40:59Z","updated_at":"2018-10-22T11:40:59Z","author_association":"MEMBER","body":"/duplicate of #60776"}}
{"actor":{"display_login":"jrieken"}}