{"action":"created","issue":{"url":"https://api.github.com/repos/SublimeTextIssues/Core/issues/1180","repository_url":"https://api.github.com/repos/SublimeTextIssues/Core","labels_url":"https://api.github.com/repos/SublimeTextIssues/Core/issues/1180/labels{/name}","comments_url":"https://api.github.com/repos/SublimeTextIssues/Core/issues/1180/comments","events_url":"https://api.github.com/repos/SublimeTextIssues/Core/issues/1180/events","html_url":"https://github.com/SublimeTextIssues/Core/issues/1180","id":150688512,"number":1180,"title":"ST v3 bug in the API view.set_name() method","user":{"login":"mattst","id":835623,"avatar_url":"https://avatars.githubusercontent.com/u/835623?v=3","gravatar_id":"","url":"https://api.github.com/users/mattst","html_url":"https://github.com/mattst","followers_url":"https://api.github.com/users/mattst/followers","following_url":"https://api.github.com/users/mattst/following{/other_user}","gists_url":"https://api.github.com/users/mattst/gists{/gist_id}","starred_url":"https://api.github.com/users/mattst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattst/subscriptions","organizations_url":"https://api.github.com/users/mattst/orgs","repos_url":"https://api.github.com/users/mattst/repos","events_url":"https://api.github.com/users/mattst/events{/privacy}","received_events_url":"https://api.github.com/users/mattst/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/SublimeTextIssues/Core/labels/C:%20API","name":"C: API","color":"669933"},{"url":"https://api.github.com/repos/SublimeTextIssues/Core/labels/S:%20trivial","name":"S: trivial","color":"F7C9B2"},{"url":"https://api.github.com/repos/SublimeTextIssues/Core/labels/T:%20bug","name":"T: bug","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-24T18:26:10Z","updated_at":"2016-04-25T12:00:57Z","closed_at":null,"body":"\r\n### Summary\r\n\r\nAn unsaved file in a ST buffer can be given a name either by typing something on the first line of the file or by using the API method `view.set_name()`. If this is done then that name is immediately shown in the buffer's file tab, in the drop-down list of files, and in the show files overlay.\r\n\r\nHowever if an unsaved file in a buffer has already been given a name, using one of the two methods described above, if you then change the name using the API method `view.set_name()` then that name will not be shown until after you have made some kind of modification to the unsaved file.\r\n\r\n### Expected behavior\r\n\r\nThe buffer's name should be changed immediately after the API method `view.set_name()` has been called.\r\n\r\n### Actual behavior\r\n\r\nThe buffer's name is not changed after the API method `view.set_name()` has been called until the unsaved buffer has been modified.\r\n\r\n### Steps to reproduce\r\n\r\n1. Create a new unsaved file in ST v3.\r\n2. Open the console and enter: `view.set_name(\"Zaphod\")` 'Zaphod' will be immediately shown as the buffer's name.\r\n3. In the console enter: `view.set_name(\"Beeblebrox\")` 'Beeblebrox' will NOT be shown as the buffer's name.\r\n4. Type a character in the unsaved buffer and 'Beeblebrox' will be immediately shown as the buffer's name.\r\n\r\n### Environment\r\n\r\n* Operating system and version:\r\n  * Linux Mint 17 Qiana (GNU/Linux x86_64)\r\n* Sublime Text:\r\n  * Build 3103\r\n\r\nThis bug is not present in ST v2 (build 2221); in that version the changed name is always shown immediately after the `view.set_name()` command has been run.\r\n\r\nHope this helps.\r\n"},"comment":{"url":"https://api.github.com/repos/SublimeTextIssues/Core/issues/comments/214282875","html_url":"https://github.com/SublimeTextIssues/Core/issues/1180#issuecomment-214282875","issue_url":"https://api.github.com/repos/SublimeTextIssues/Core/issues/1180","id":214282875,"user":{"login":"Enteleform","id":10906415,"avatar_url":"https://avatars.githubusercontent.com/u/10906415?v=3","gravatar_id":"","url":"https://api.github.com/users/Enteleform","html_url":"https://github.com/Enteleform","followers_url":"https://api.github.com/users/Enteleform/followers","following_url":"https://api.github.com/users/Enteleform/following{/other_user}","gists_url":"https://api.github.com/users/Enteleform/gists{/gist_id}","starred_url":"https://api.github.com/users/Enteleform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Enteleform/subscriptions","organizations_url":"https://api.github.com/users/Enteleform/orgs","repos_url":"https://api.github.com/users/Enteleform/repos","events_url":"https://api.github.com/users/Enteleform/events{/privacy}","received_events_url":"https://api.github.com/users/Enteleform/received_events","type":"User","site_admin":false},"created_at":"2016-04-25T12:00:57Z","updated_at":"2016-04-25T12:00:57Z","body":"@mattst \r\n\r\nI posted a solution @ my related thread that @keith-hall mentioned:\r\n\r\n### [**NameUnsavedTabCommand**](https://forum.sublimetext.com/t/unsaved-tabname-bug/19428/4)"}}