{"action":"created","issue":{"url":"https://api.github.com/repos/mbbill/undotree/issues/88","repository_url":"https://api.github.com/repos/mbbill/undotree","labels_url":"https://api.github.com/repos/mbbill/undotree/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/mbbill/undotree/issues/88/comments","events_url":"https://api.github.com/repos/mbbill/undotree/issues/88/events","html_url":"https://github.com/mbbill/undotree/issues/88","id":353317544,"node_id":"MDU6SXNzdWUzNTMzMTc1NDQ=","number":88,"title":"Loses hook to target when files loaded from different directories","user":{"login":"Rich-YoYo","id":42639982,"node_id":"MDQ6VXNlcjQyNjM5OTgy","avatar_url":"https://avatars1.githubusercontent.com/u/42639982?v=4","gravatar_id":"","url":"https://api.github.com/users/Rich-YoYo","html_url":"https://github.com/Rich-YoYo","followers_url":"https://api.github.com/users/Rich-YoYo/followers","following_url":"https://api.github.com/users/Rich-YoYo/following{/other_user}","gists_url":"https://api.github.com/users/Rich-YoYo/gists{/gist_id}","starred_url":"https://api.github.com/users/Rich-YoYo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rich-YoYo/subscriptions","organizations_url":"https://api.github.com/users/Rich-YoYo/orgs","repos_url":"https://api.github.com/users/Rich-YoYo/repos","events_url":"https://api.github.com/users/Rich-YoYo/events{/privacy}","received_events_url":"https://api.github.com/users/Rich-YoYo/received_events","type":"User","site_admin":false},"labels":[{"id":11876474,"node_id":"MDU6TGFiZWwxMTg3NjQ3NA==","url":"https://api.github.com/repos/mbbill/undotree/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":{"login":"mbbill","id":841602,"node_id":"MDQ6VXNlcjg0MTYwMg==","avatar_url":"https://avatars3.githubusercontent.com/u/841602?v=4","gravatar_id":"","url":"https://api.github.com/users/mbbill","html_url":"https://github.com/mbbill","followers_url":"https://api.github.com/users/mbbill/followers","following_url":"https://api.github.com/users/mbbill/following{/other_user}","gists_url":"https://api.github.com/users/mbbill/gists{/gist_id}","starred_url":"https://api.github.com/users/mbbill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbbill/subscriptions","organizations_url":"https://api.github.com/users/mbbill/orgs","repos_url":"https://api.github.com/users/mbbill/repos","events_url":"https://api.github.com/users/mbbill/events{/privacy}","received_events_url":"https://api.github.com/users/mbbill/received_events","type":"User","site_admin":false},"assignees":[{"login":"mbbill","id":841602,"node_id":"MDQ6VXNlcjg0MTYwMg==","avatar_url":"https://avatars3.githubusercontent.com/u/841602?v=4","gravatar_id":"","url":"https://api.github.com/users/mbbill","html_url":"https://github.com/mbbill","followers_url":"https://api.github.com/users/mbbill/followers","following_url":"https://api.github.com/users/mbbill/following{/other_user}","gists_url":"https://api.github.com/users/mbbill/gists{/gist_id}","starred_url":"https://api.github.com/users/mbbill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbbill/subscriptions","organizations_url":"https://api.github.com/users/mbbill/orgs","repos_url":"https://api.github.com/users/mbbill/repos","events_url":"https://api.github.com/users/mbbill/events{/privacy}","received_events_url":"https://api.github.com/users/mbbill/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-08-23T10:20:50Z","updated_at":"2018-08-23T18:43:11Z","closed_at":null,"author_association":"NONE","body":"To reproduce;-\r\n\r\n- Load a file 'A' from a directory ./a/\r\n- In a new window, load a file 'B' from a (different) directory ./b/\r\n- Open undotree\r\n- Move focus between 'A' and 'B' - undotree updates as expected\r\n- Move focus to 'B' and then move focus to undotree - undotree display persists as expected\r\n- Move focus to 'A' and then move focus to undotree - undotree disappears - not as expected\r\n\r\nie - if the undotree window is in focus, then undo data disappears if it relates to a file from a different directory to that of the the last file loaded. The number of files involves doesn't seem to matter; taking the above example, if several files were loaded from ./a/ then they would all exhibit this problem\r\n\r\nNote that undotree data is always displayed correctly as long as its own window is NOT in focus\r\n\r\nI have recently added a function to undotree to allow me to retrieve the window Id that it is displaying undo information for (so that I can add it to undotree's status bar). From this, I can see that when undotree data disappears (when its window is in focus), its internal 'focusid' (window Id) is set to itself rather than to the buffer who's undo data it is displaying. Once focus moves away from undotree, 'focusid' is corrected again.\r\n\r\nI wondered if the problem could be related to my use of 'set autochdir' but it seems to make no difference"},"comment":{"url":"https://api.github.com/repos/mbbill/undotree/issues/comments/415526373","html_url":"https://github.com/mbbill/undotree/issues/88#issuecomment-415526373","issue_url":"https://api.github.com/repos/mbbill/undotree/issues/88","id":415526373,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNTUyNjM3Mw==","user":{"login":"mbbill","id":841602,"node_id":"MDQ6VXNlcjg0MTYwMg==","avatar_url":"https://avatars3.githubusercontent.com/u/841602?v=4","gravatar_id":"","url":"https://api.github.com/users/mbbill","html_url":"https://github.com/mbbill","followers_url":"https://api.github.com/users/mbbill/followers","following_url":"https://api.github.com/users/mbbill/following{/other_user}","gists_url":"https://api.github.com/users/mbbill/gists{/gist_id}","starred_url":"https://api.github.com/users/mbbill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbbill/subscriptions","organizations_url":"https://api.github.com/users/mbbill/orgs","repos_url":"https://api.github.com/users/mbbill/repos","events_url":"https://api.github.com/users/mbbill/events{/privacy}","received_events_url":"https://api.github.com/users/mbbill/received_events","type":"User","site_admin":false},"created_at":"2018-08-23T18:43:11Z","updated_at":"2018-08-23T18:43:11Z","author_association":"OWNER","body":"fixed in b1b7667a1f2e52f61eab21ef86622dcf412ba431\r\nthe reason is the ```autochdir``` option will sometimes change the return value of bufname('%') which I used to tell if that buffer is belong to the undotree. When ```autochdir``` is turned off, the bufname('%') will always return *undotree_id* but with that option turned on, it becomes ```/path/to/some/dir/undotree_id```\r\nNow I'm using a buffer value instead so that it won't be affected by buffer name anymore."}}
{"actor":{"display_login":"mbbill"}}