{"action":"closed","issue":{"url":"https://api.github.com/repos/Microsoft/vscode/issues/63297","repository_url":"https://api.github.com/repos/Microsoft/vscode","labels_url":"https://api.github.com/repos/Microsoft/vscode/issues/63297/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vscode/issues/63297/comments","events_url":"https://api.github.com/repos/Microsoft/vscode/issues/63297/events","html_url":"https://github.com/Microsoft/vscode/issues/63297","id":381569091,"node_id":"MDU6SXNzdWUzODE1NjkwOTE=","number":63297,"title":"Multiline regex with capture group substitutes $1 literally until Replace Preview is opened","user":{"login":"Simran-B","id":7819991,"node_id":"MDQ6VXNlcjc4MTk5OTE=","avatar_url":"https://avatars3.githubusercontent.com/u/7819991?v=4","gravatar_id":"","url":"https://api.github.com/users/Simran-B","html_url":"https://github.com/Simran-B","followers_url":"https://api.github.com/users/Simran-B/followers","following_url":"https://api.github.com/users/Simran-B/following{/other_user}","gists_url":"https://api.github.com/users/Simran-B/gists{/gist_id}","starred_url":"https://api.github.com/users/Simran-B/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Simran-B/subscriptions","organizations_url":"https://api.github.com/users/Simran-B/orgs","repos_url":"https://api.github.com/users/Simran-B/repos","events_url":"https://api.github.com/users/Simran-B/events{/privacy}","received_events_url":"https://api.github.com/users/Simran-B/received_events","type":"User","site_admin":false},"labels":[{"id":256129993,"node_id":"MDU6TGFiZWwyNTYxMjk5OTM=","url":"https://api.github.com/repos/Microsoft/vscode/labels/bug","name":"bug","color":"8D6673","default":true},{"id":301186618,"node_id":"MDU6TGFiZWwzMDExODY2MTg=","url":"https://api.github.com/repos/Microsoft/vscode/labels/search","name":"search","color":"1d76db","default":false}],"state":"closed","locked":false,"assignee":{"login":"roblourens","id":323878,"node_id":"MDQ6VXNlcjMyMzg3OA==","avatar_url":"https://avatars3.githubusercontent.com/u/323878?v=4","gravatar_id":"","url":"https://api.github.com/users/roblourens","html_url":"https://github.com/roblourens","followers_url":"https://api.github.com/users/roblourens/followers","following_url":"https://api.github.com/users/roblourens/following{/other_user}","gists_url":"https://api.github.com/users/roblourens/gists{/gist_id}","starred_url":"https://api.github.com/users/roblourens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roblourens/subscriptions","organizations_url":"https://api.github.com/users/roblourens/orgs","repos_url":"https://api.github.com/users/roblourens/repos","events_url":"https://api.github.com/users/roblourens/events{/privacy}","received_events_url":"https://api.github.com/users/roblourens/received_events","type":"User","site_admin":false},"assignees":[{"login":"roblourens","id":323878,"node_id":"MDQ6VXNlcjMyMzg3OA==","avatar_url":"https://avatars3.githubusercontent.com/u/323878?v=4","gravatar_id":"","url":"https://api.github.com/users/roblourens","html_url":"https://github.com/roblourens","followers_url":"https://api.github.com/users/roblourens/followers","following_url":"https://api.github.com/users/roblourens/following{/other_user}","gists_url":"https://api.github.com/users/roblourens/gists{/gist_id}","starred_url":"https://api.github.com/users/roblourens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roblourens/subscriptions","organizations_url":"https://api.github.com/users/roblourens/orgs","repos_url":"https://api.github.com/users/roblourens/repos","events_url":"https://api.github.com/users/roblourens/events{/privacy}","received_events_url":"https://api.github.com/users/roblourens/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/Microsoft/vscode/milestones/81","html_url":"https://github.com/Microsoft/vscode/milestone/81","labels_url":"https://api.github.com/repos/Microsoft/vscode/milestones/81/labels","id":3739917,"node_id":"MDk6TWlsZXN0b25lMzczOTkxNw==","number":81,"title":"November 2018","description":"","creator":{"login":"isidorn","id":1926584,"node_id":"MDQ6VXNlcjE5MjY1ODQ=","avatar_url":"https://avatars2.githubusercontent.com/u/1926584?v=4","gravatar_id":"","url":"https://api.github.com/users/isidorn","html_url":"https://github.com/isidorn","followers_url":"https://api.github.com/users/isidorn/followers","following_url":"https://api.github.com/users/isidorn/following{/other_user}","gists_url":"https://api.github.com/users/isidorn/gists{/gist_id}","starred_url":"https://api.github.com/users/isidorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isidorn/subscriptions","organizations_url":"https://api.github.com/users/isidorn/orgs","repos_url":"https://api.github.com/users/isidorn/repos","events_url":"https://api.github.com/users/isidorn/events{/privacy}","received_events_url":"https://api.github.com/users/isidorn/received_events","type":"User","site_admin":false},"open_issues":166,"closed_issues":285,"state":"open","created_at":"2018-10-15T14:34:57Z","updated_at":"2018-11-30T18:45:42Z","due_on":null,"closed_at":null},"comments":12,"created_at":"2018-11-16T11:55:22Z","updated_at":"2018-11-30T18:45:42Z","closed_at":"2018-11-30T18:45:42Z","author_association":"NONE","body":"**Version:** 1.30.0-insider (but also seen in released 1.29.0)\r\nCommit: 24b0f75b1e33b88f30f2ed9d5b17ca60062c270b\r\nDate: 2018-11-16T06:20:02.054Z\r\nElectron: 2.0.12\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**Steps to Reproduce:**\r\n\r\n1. Create a folder `multiline-capture`\r\n2. Create a file `test.md` inside the folder with the following content:\r\n\r\n       Use a loop to iterate over an array and\r\n       print something.\r\n\r\n3. Open the folder in vscode\r\n4. Open Search panel, enable regex option and use: `(array).+\\n` and `$1`\r\n5. Hit return or Refresh. The preview in the search panel shows:\r\n    > a loop over an <del>array and</del>$1\r\n6. Click on it to open the _Replace Preview_.\r\n    It confirms that the match will be replaced by a literal `$1`\r\n7. Close the _Replace Preview_. In this moment, the preview in the search panel changes to:\r\n   > a loop over an <del>array and</del>array\r\n8. Click on it again to open the full preview and see it confirmed that it will replace it by the capture group value `array` now.\r\n9. Refresh the search. It goes back to `$1` \r\n10. If you use _Replace All_, the result is as shown in the preview, so the match is either replaced by `$1` or `array` depending on what it showed before you replaced all occurrences.\r\n11. Remove `\\n` from the expression and refresh search: The issue does not occur, the preview shows `array` as substitute value immediately.\r\n\r\n![image](https://user-images.githubusercontent.com/7819991/48619598-4f0a1c00-e99d-11e8-983a-6fc03efb6b84.png)\r\n![image](https://user-images.githubusercontent.com/7819991/48619653-72cd6200-e99d-11e8-967b-f231dd2c6ad5.png)\r\n\r\n**Expected behavior:**\r\nI expect it to replace the match with the content of the capture group (which is `array`) all the time.\r\n\r\nDoes this issue occur when all extensions are disabled?: Yes\r\n"}}
{"actor":{"display_login":"roblourens"}}