{"action":"created","issue":{"url":"https://api.github.com/repos/mawww/kakoune/issues/1229","repository_url":"https://api.github.com/repos/mawww/kakoune","labels_url":"https://api.github.com/repos/mawww/kakoune/issues/1229/labels{/name}","comments_url":"https://api.github.com/repos/mawww/kakoune/issues/1229/comments","events_url":"https://api.github.com/repos/mawww/kakoune/issues/1229/events","html_url":"https://github.com/mawww/kakoune/issues/1229","id":208925363,"number":1229,"title":"Removing the parent directory of an open file kills file completion","user":{"login":"lenormf","id":1379068,"avatar_url":"https://avatars.githubusercontent.com/u/1379068?v=3","gravatar_id":"","url":"https://api.github.com/users/lenormf","html_url":"https://github.com/lenormf","followers_url":"https://api.github.com/users/lenormf/followers","following_url":"https://api.github.com/users/lenormf/following{/other_user}","gists_url":"https://api.github.com/users/lenormf/gists{/gist_id}","starred_url":"https://api.github.com/users/lenormf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lenormf/subscriptions","organizations_url":"https://api.github.com/users/lenormf/orgs","repos_url":"https://api.github.com/users/lenormf/repos","events_url":"https://api.github.com/users/lenormf/events{/privacy}","received_events_url":"https://api.github.com/users/lenormf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-02-20T16:20:52Z","updated_at":"2017-02-20T19:43:02Z","closed_at":null,"body":"Hi,\r\n\r\nSteps to reproduce the issue:\r\n\r\n```\r\n mkdir t && kak t/a\r\n:cd t; write\r\n^Z\r\nrm -r t && mkdir t && echo > t/a\r\nfg\r\n```\r\n\r\nAfter hitting the return key to refresh the contents of the buffer, I don't get any file completion on `edit`.\r\n\r\nNote that this will happen only if the instance of `kak` was within the directory that got removed.\r\n\r\nHTH."},"comment":{"url":"https://api.github.com/repos/mawww/kakoune/issues/comments/281166183","html_url":"https://github.com/mawww/kakoune/issues/1229#issuecomment-281166183","issue_url":"https://api.github.com/repos/mawww/kakoune/issues/1229","id":281166183,"user":{"login":"mawww","id":51221,"avatar_url":"https://avatars.githubusercontent.com/u/51221?v=3","gravatar_id":"","url":"https://api.github.com/users/mawww","html_url":"https://github.com/mawww","followers_url":"https://api.github.com/users/mawww/followers","following_url":"https://api.github.com/users/mawww/following{/other_user}","gists_url":"https://api.github.com/users/mawww/gists{/gist_id}","starred_url":"https://api.github.com/users/mawww/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mawww/subscriptions","organizations_url":"https://api.github.com/users/mawww/orgs","repos_url":"https://api.github.com/users/mawww/repos","events_url":"https://api.github.com/users/mawww/events{/privacy}","received_events_url":"https://api.github.com/users/mawww/received_events","type":"User","site_admin":false},"created_at":"2017-02-20T19:43:02Z","updated_at":"2017-02-20T19:43:02Z","body":"So, whats happening here is that the current directory of Kakoune is still the previous `t`, removing and recreating a directory with the same name did not magically move Kakoune to the new directory. It happens that, as this directory has been removed from the filesystem, it is empty (not even containing . or ..).\r\n\r\nWe could try to outsmart the kernel and pretend we actually are in the newly created directory, but I am not convinced its worth it. Besides, seems you'll get the same behaviour in the shell:\r\n\r\n```\r\n$ mkdir t   \r\n$ cd t\r\n$ touch a\r\n$ ls\r\na\r\n$ rm -r ../t\r\n$ ls\r\n$ mkdir ../t\r\n$ touch ../t/a\r\n$ ls\r\n$ cd ../t  \r\n$ ls\r\na\r\n```"}}
{"actor":{"display_login":"mawww"}}