{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/vscode/issues/8341","repository_url":"https://api.github.com/repos/Microsoft/vscode","labels_url":"https://api.github.com/repos/Microsoft/vscode/issues/8341/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vscode/issues/8341/comments","events_url":"https://api.github.com/repos/Microsoft/vscode/issues/8341/events","html_url":"https://github.com/Microsoft/vscode/issues/8341","id":162677450,"number":8341,"title":"[decorations] TextDecoration#after not working?","user":{"login":"jrieken","id":1794099,"avatar_url":"https://avatars.githubusercontent.com/u/1794099?v=3","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},"labels":[{"url":"https://api.github.com/repos/Microsoft/vscode/labels/bug","name":"bug","color":"E57E7E"}],"state":"open","locked":false,"assignee":{"login":"aeschli","id":6461412,"avatar_url":"https://avatars.githubusercontent.com/u/6461412?v=3","gravatar_id":"","url":"https://api.github.com/users/aeschli","html_url":"https://github.com/aeschli","followers_url":"https://api.github.com/users/aeschli/followers","following_url":"https://api.github.com/users/aeschli/following{/other_user}","gists_url":"https://api.github.com/users/aeschli/gists{/gist_id}","starred_url":"https://api.github.com/users/aeschli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aeschli/subscriptions","organizations_url":"https://api.github.com/users/aeschli/orgs","repos_url":"https://api.github.com/users/aeschli/repos","events_url":"https://api.github.com/users/aeschli/events{/privacy}","received_events_url":"https://api.github.com/users/aeschli/received_events","type":"User","site_admin":false},"assignees":[{"login":"aeschli","id":6461412,"avatar_url":"https://avatars.githubusercontent.com/u/6461412?v=3","gravatar_id":"","url":"https://api.github.com/users/aeschli","html_url":"https://github.com/aeschli","followers_url":"https://api.github.com/users/aeschli/followers","following_url":"https://api.github.com/users/aeschli/following{/other_user}","gists_url":"https://api.github.com/users/aeschli/gists{/gist_id}","starred_url":"https://api.github.com/users/aeschli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aeschli/subscriptions","organizations_url":"https://api.github.com/users/aeschli/orgs","repos_url":"https://api.github.com/users/aeschli/repos","events_url":"https://api.github.com/users/aeschli/events{/privacy}","received_events_url":"https://api.github.com/users/aeschli/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/Microsoft/vscode/milestones/23","html_url":"https://github.com/Microsoft/vscode/milestones/August%202016","labels_url":"https://api.github.com/repos/Microsoft/vscode/milestones/23/labels","id":1854621,"number":23,"title":"August 2016","description":"","creator":{"login":"dbaeumer","id":1931590,"avatar_url":"https://avatars.githubusercontent.com/u/1931590?v=3","gravatar_id":"","url":"https://api.github.com/users/dbaeumer","html_url":"https://github.com/dbaeumer","followers_url":"https://api.github.com/users/dbaeumer/followers","following_url":"https://api.github.com/users/dbaeumer/following{/other_user}","gists_url":"https://api.github.com/users/dbaeumer/gists{/gist_id}","starred_url":"https://api.github.com/users/dbaeumer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbaeumer/subscriptions","organizations_url":"https://api.github.com/users/dbaeumer/orgs","repos_url":"https://api.github.com/users/dbaeumer/repos","events_url":"https://api.github.com/users/dbaeumer/events{/privacy}","received_events_url":"https://api.github.com/users/dbaeumer/received_events","type":"User","site_admin":false},"open_issues":86,"closed_issues":328,"state":"open","created_at":"2016-06-29T08:56:21Z","updated_at":"2016-08-29T19:39:57Z","due_on":"2016-09-02T00:00:00Z","closed_at":null},"comments":3,"created_at":"2016-06-28T12:47:34Z","updated_at":"2016-08-29T19:50:51Z","closed_at":null,"body":"re #8268\r\n\r\n* have an extension like below\r\n* make a change in JS file that has a return statement\r\n* ⚡ I see the gutter icon but no after text\r\n\r\n```\r\n'use strict';\r\n// The module 'vscode' contains the VS Code extensibility API\r\n// Import the module and reference it with the alias vscode in your code below\r\nimport * as vscode from 'vscode';\r\n\r\n// this method is called when your extension is activated\r\n// your extension is activated the very first time the command is executed\r\nexport function activate(context: vscode.ExtensionContext) {\r\n\r\n    const ret = vscode.window.createTextEditorDecorationType({\r\n        // before: {\r\n        //     contentText: '⬅️',\r\n        //     color: 'orange',\r\n        //     // contentIconPath: context.asAbsolutePath('./Screen Shot 2016-06-28 at 14.23.44.png'),\r\n        //     backgroundColor: 'blue',\r\n        //     border: 'dotted thin yellow'\r\n        // },\r\n        after: {\r\n            contentText: '<-- Returns',\r\n            textDecoration: 'underline'\r\n        },\r\n        cursor: 'pointer',\r\n        color: 'green',\r\n        gutterIconPath: context.asAbsolutePath('./Screen Shot 2016-06-28 at 14.23.44.png'),\r\n        gutterIconSize: ''\r\n    });\r\n\r\n    vscode.workspace.onDidChangeTextDocument(event => { \r\n\r\n        let {document} = event;\r\n        let retRanges: vscode.Range[] = [];\r\n        for (let i = 0; i < document.lineCount; i++) {\r\n            let line = document.lineAt(i);\r\n\r\n            if (/^\\s*return/.test(line.text)) {\r\n                retRanges.push(line.range.with({ end: line.range.start }));\r\n            }\r\n        }\r\n\r\n        for (let editor of vscode.window.visibleTextEditors) {\r\n            if (editor.document.uri.toString() === document.uri.toString()) {\r\n                editor.setDecorations(ret, retRanges.map(range => (<vscode.DecorationOptions>{\r\n                    range, hoverMessage: \"RET\"\r\n                })));\r\n            }\r\n        }\r\n\r\n    });\r\n\r\n}\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/vscode/issues/comments/243234722","html_url":"https://github.com/Microsoft/vscode/issues/8341#issuecomment-243234722","issue_url":"https://api.github.com/repos/Microsoft/vscode/issues/8341","id":243234722,"user":{"login":"aeschli","id":6461412,"avatar_url":"https://avatars.githubusercontent.com/u/6461412?v=3","gravatar_id":"","url":"https://api.github.com/users/aeschli","html_url":"https://github.com/aeschli","followers_url":"https://api.github.com/users/aeschli/followers","following_url":"https://api.github.com/users/aeschli/following{/other_user}","gists_url":"https://api.github.com/users/aeschli/gists{/gist_id}","starred_url":"https://api.github.com/users/aeschli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aeschli/subscriptions","organizations_url":"https://api.github.com/users/aeschli/orgs","repos_url":"https://api.github.com/users/aeschli/repos","events_url":"https://api.github.com/users/aeschli/events{/privacy}","received_events_url":"https://api.github.com/users/aeschli/received_events","type":"User","site_admin":false},"created_at":"2016-08-29T19:50:51Z","updated_at":"2016-08-29T19:50:51Z","body":"Empty ranges are not supported. I will update the documentation."}}
{"actor":{"display_login":"aeschli"}}