{"action":"created","issue":{"url":"https://api.github.com/repos/norgepaul/TChromeTabs/issues/37","labels_url":"https://api.github.com/repos/norgepaul/TChromeTabs/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/norgepaul/TChromeTabs/issues/37/comments","events_url":"https://api.github.com/repos/norgepaul/TChromeTabs/issues/37/events","html_url":"https://github.com/norgepaul/TChromeTabs/issues/37","id":115014325,"number":37,"title":"Delete Tab logic faulty when tab is flanked by invisible tabs.","user":{"login":"Andyk123","id":15648633,"avatar_url":"https://avatars.githubusercontent.com/u/15648633?v=3","gravatar_id":"","url":"https://api.github.com/users/Andyk123","html_url":"https://github.com/Andyk123","followers_url":"https://api.github.com/users/Andyk123/followers","following_url":"https://api.github.com/users/Andyk123/following{/other_user}","gists_url":"https://api.github.com/users/Andyk123/gists{/gist_id}","starred_url":"https://api.github.com/users/Andyk123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Andyk123/subscriptions","organizations_url":"https://api.github.com/users/Andyk123/orgs","repos_url":"https://api.github.com/users/Andyk123/repos","events_url":"https://api.github.com/users/Andyk123/events{/privacy}","received_events_url":"https://api.github.com/users/Andyk123/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-04T09:50:22Z","updated_at":"2015-11-04T09:56:44Z","closed_at":"2015-11-04T09:56:44Z","body":""},"comment":{"url":"https://api.github.com/repos/norgepaul/TChromeTabs/issues/comments/153665401","html_url":"https://github.com/norgepaul/TChromeTabs/issues/37#issuecomment-153665401","issue_url":"https://api.github.com/repos/norgepaul/TChromeTabs/issues/37","id":153665401,"user":{"login":"Andyk123","id":15648633,"avatar_url":"https://avatars.githubusercontent.com/u/15648633?v=3","gravatar_id":"","url":"https://api.github.com/users/Andyk123","html_url":"https://github.com/Andyk123","followers_url":"https://api.github.com/users/Andyk123/followers","following_url":"https://api.github.com/users/Andyk123/following{/other_user}","gists_url":"https://api.github.com/users/Andyk123/gists{/gist_id}","starred_url":"https://api.github.com/users/Andyk123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Andyk123/subscriptions","organizations_url":"https://api.github.com/users/Andyk123/orgs","repos_url":"https://api.github.com/users/Andyk123/repos","events_url":"https://api.github.com/users/Andyk123/events{/privacy}","received_events_url":"https://api.github.com/users/Andyk123/received_events","type":"User","site_admin":false},"created_at":"2015-11-04T09:56:44Z","updated_at":"2015-11-04T09:56:44Z","body":"When a tab is deleted, the active tab becomes the tab to the left of the deleted tab. The tab becomes active even if it is invisible. This forces the renderer to draw the invisible tab.\r\n\r\nI fixed the problem with following code change in TChromeTabsList.DeleteTab\r\n\r\n    if NewIdx > Count - 1 then\r\n      NewIdx := Count - 1;\r\n    while (NewIdx<>-1) and not(Items[NewIdx].visible) do\r\n      dec(NewIdx);\r\n    if NewIdx <> -1 then\r\n      Items[NewIdx].Active := TRUE;"}}