{"action":"created","issue":{"url":"https://api.github.com/repos/neovim/neovim/issues/3005","labels_url":"https://api.github.com/repos/neovim/neovim/issues/3005/labels{/name}","comments_url":"https://api.github.com/repos/neovim/neovim/issues/3005/comments","events_url":"https://api.github.com/repos/neovim/neovim/issues/3005/events","html_url":"https://github.com/neovim/neovim/pull/3005","id":94828278,"number":3005,"title":"[RDY] synIDattr(): take true colors into account","user":{"login":"mhinz","id":972014,"avatar_url":"https://avatars.githubusercontent.com/u/972014?v=3","gravatar_id":"","url":"https://api.github.com/users/mhinz","html_url":"https://github.com/mhinz","followers_url":"https://api.github.com/users/mhinz/followers","following_url":"https://api.github.com/users/mhinz/following{/other_user}","gists_url":"https://api.github.com/users/mhinz/gists{/gist_id}","starred_url":"https://api.github.com/users/mhinz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhinz/subscriptions","organizations_url":"https://api.github.com/users/mhinz/orgs","repos_url":"https://api.github.com/users/mhinz/repos","events_url":"https://api.github.com/users/mhinz/events{/privacy}","received_events_url":"https://api.github.com/users/mhinz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/neovim/neovim/labels/ui","name":"ui","color":"c7def8"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2015-07-13T22:41:32Z","updated_at":"2015-07-18T15:00:38Z","closed_at":"2015-07-18T15:00:37Z","pull_request":{"url":"https://api.github.com/repos/neovim/neovim/pulls/3005","html_url":"https://github.com/neovim/neovim/pull/3005","diff_url":"https://github.com/neovim/neovim/pull/3005.diff","patch_url":"https://github.com/neovim/neovim/pull/3005.patch"},"body":"In Vim, which doesn't support true colors, `synIDattr('Foo', 'fg')` returns either\r\n`ctermfg` or `guifg` depending on whether vim or gvim is running.\r\n\r\nTrue colors naturally use GUI colors, so `synIDattr()` has to be adapted to\r\nreturn `guifg`, if a TUI with enabled true colors is used.\r\n\r\n---\r\n\r\nSomeone in `#vim` had this problem, so I looked for a solution. Basically I really just stole this line from https://github.com/neovim/neovim/blob/master/src/nvim/tui/tui.c#L140\r\n\r\nMaybe there's a better way to query the UI.\r\n\r\nAlso, since I have no true colors support, I couldn't test it myself. It would be nice, if someone could do that."},"comment":{"url":"https://api.github.com/repos/neovim/neovim/issues/comments/122550923","html_url":"https://github.com/neovim/neovim/pull/3005#issuecomment-122550923","issue_url":"https://api.github.com/repos/neovim/neovim/issues/3005","id":122550923,"user":{"login":"mhinz","id":972014,"avatar_url":"https://avatars.githubusercontent.com/u/972014?v=3","gravatar_id":"","url":"https://api.github.com/users/mhinz","html_url":"https://github.com/mhinz","followers_url":"https://api.github.com/users/mhinz/followers","following_url":"https://api.github.com/users/mhinz/following{/other_user}","gists_url":"https://api.github.com/users/mhinz/gists{/gist_id}","starred_url":"https://api.github.com/users/mhinz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhinz/subscriptions","organizations_url":"https://api.github.com/users/mhinz/orgs","repos_url":"https://api.github.com/users/mhinz/repos","events_url":"https://api.github.com/users/mhinz/events{/privacy}","received_events_url":"https://api.github.com/users/mhinz/received_events","type":"User","site_admin":false},"created_at":"2015-07-18T15:00:37Z","updated_at":"2015-07-18T15:00:37Z","body":"Merged!"}}